Index: gc_core/js/lang_core/gc_engine.js ================================================================== --- gc_core/js/lang_core/gc_engine.js +++ gc_core/js/lang_core/gc_engine.js @@ -412,11 +412,11 @@ yield { "iNode1": iNode1, "dNode": dGraph[dNode[""][sRegex]] }; bTokenFound = true; } } else { // there is an anti-pattern - let [sPattern, sNegPattern] = sRegex.split("¬", 1); + let [sPattern, sNegPattern] = sRegex.split("¬", 2); if (sNegPattern && dToken["sValue"].search(sNegPattern) !== -1) { continue; } if (!sPattern || dToken["sValue"].search(sPattern) !== -1) { if (bDebug) { @@ -456,11 +456,11 @@ yield { "iNode1": iNode1, "dNode": dGraph[dNode[""][sRegex]] }; bTokenFound = true; } } else { // there is an anti-pattern - let [sPattern, sNegPattern] = sRegex.split("¬", 1); + let [sPattern, sNegPattern] = sRegex.split("¬", 2); if (sNegPattern == "*") { // all morphologies must match with if (sPattern) { if (lMorph.length > 0 && lMorph.every(sMorph => (sMorph.search(sPattern) !== -1))) { if (bDebug) { @@ -600,15 +600,15 @@ let nTokenErrorStart = (iTokenStart > 0) ? nTokenOffset + iTokenStart : nLastToken + iTokenStart; if (!this.lToken[nTokenErrorStart].hasOwnProperty("bImmune")) { let nTokenErrorEnd = (iTokenEnd > 0) ? nTokenOffset + iTokenEnd : nLastToken + iTokenEnd; let nErrorStart = this.nOffsetWithinParagraph + ((cStartLimit == "<") ? this.lToken[nTokenErrorStart]["nStart"] : this.lToken[nTokenErrorStart]["nEnd"]); let nErrorEnd = this.nOffsetWithinParagraph + ((cEndLimit == ">") ? this.lToken[nTokenErrorEnd]["nEnd"] : this.lToken[nTokenErrorEnd]["nStart"]); - if (!this.dError.has(nErrorStart) || nPriority > this.dErrorPriority.get(nErrorStart, -1)) { - this.dError[nErrorStart] = this._createErrorFromTokens(sWhat, nTokenOffset, nLastToken, nTokenErrorStart, nErrorStart, nErrorEnd, sLineId, sRuleId, bCaseSvty, sMessage, sURL, bShowRuleId, sOption, bContext); + if (!this.dError.has(nErrorStart) || nPriority > this.dErrorPriority.gl_get(nErrorStart, -1)) { + this.dError.set(nErrorStart, this._createErrorFromTokens(sWhat, nTokenOffset, nLastToken, nTokenErrorStart, nErrorStart, nErrorEnd, sLineId, sRuleId, bCaseSvty, sMessage, sURL, bShowRuleId, sOption, bContext)); this.dErrorPriority[nErrorStart] = nPriority; if (bDebug) { - console.log(" NEW_ERROR: ", this.dError[nErrorStart]); + console.log(" NEW_ERROR: ", this.dError.get(nErrorStart)); } } } } else if (cActionType == "~") {