Index: gc_core/py/lang_core/gc_engine.py ================================================================== --- gc_core/py/lang_core/gc_engine.py +++ gc_core/py/lang_core/gc_engine.py @@ -260,13 +260,13 @@ dErr["sType"] = sOption if sOption else "notype" dErr["sMessage"] = sMessage dErr["aSuggestions"] = lSugg dErr["URL"] = sURL if sURL else "" if bContext: - dErr['sUnderlined'] = self.sSentence0[nStart:nEnd] - dErr['sBefore'] = self.sSentence0[max(0,nStart-80):nStart] - dErr['sAfter'] = self.sSentence0[nEnd:nEnd+80] + dErr['sUnderlined'] = sx[nStart:nEnd] + dErr['sBefore'] = sx[max(0,nStart-80):nStart] + dErr['sAfter'] = sx[nEnd:nEnd+80] return dErr def _rewrite (sSentence, sRepl, iGroup, m, bUppercase): "text processor: write in at position" @@ -776,11 +776,11 @@ if "bImmune" not in self.lToken[nTokenErrorStart]: nTokenErrorEnd = nTokenOffset + iTokenEnd if iTokenEnd > 0 else nLastToken + iTokenEnd nErrorStart = self.nOffsetWithinParagraph + (self.lToken[nTokenErrorStart]["nStart"] if cStartLimit == "<" else self.lToken[nTokenErrorStart]["nEnd"]) nErrorEnd = self.nOffsetWithinParagraph + (self.lToken[nTokenErrorEnd]["nEnd"] if cEndLimit == ">" else self.lToken[nTokenErrorEnd]["nStart"]) if nErrorStart not in self.dError or nPriority > dPriority.get(nErrorStart, -1): - self.dError[nErrorStart] = self._createError(sWhat, nTokenOffset, nLastToken, nTokenErrorStart, nErrorStart, nErrorEnd, sLineId, sRuleId, bCaseSvty, sMessage, sURL, bShowRuleId, "notype", bContext) + self.dError[nErrorStart] = self._createError(sWhat, nTokenOffset, nLastToken, nTokenErrorStart, nErrorStart, nErrorEnd, sLineId, sRuleId, bCaseSvty, sMessage, sURL, bShowRuleId, sOption, bContext) dPriority[nErrorStart] = nPriority if bDebug: print(" NEW_ERROR: ", sRuleId, sLineId, ": ", self.dError[nErrorStart]) elif cActionType == "~": # text processor