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 @@ -733,14 +733,16 @@ } } if (bDebug) { console.log(` TAG: ${sWhat} > [${this.lToken[nTokenStart]["sValue"]}:${this.lToken[nTokenEnd]["sValue"]}]`); } - if (!this.dTags.has(sWhat)) { - this.dTags.set(sWhat, [nTokenStart, nTokenStart]); - } else { - this.dTags.set(sWhat, [Math.min(nTokenStart, this.dTags.get(sWhat)[0]), Math.max(nTokenEnd, this.dTags.get(sWhat)[1])]); + for (let sTag of sWhat.split("|")) { + if (!this.dTags.has(sTag)) { + this.dTags.set(sTag, [nTokenStart, nTokenEnd]); + } else { + this.dTags.set(sTag, [Math.min(nTokenStart, this.dTags.get(sTag)[0]), Math.max(nTokenEnd, this.dTags.get(sTag)[1])]); + } } } else if (cActionType == "!") { // immunity if (bDebug) { 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 @@ -637,15 +637,16 @@ self.lToken[i]["aTags"].update(sWhat.split("|")) else: self.lToken[i]["aTags"] = set(sWhat.split("|")) if bDebug: echo(" TAG: {} > [{}:{}]".format(sWhat, self.lToken[nTokenStart]["sValue"], self.lToken[nTokenEnd]["sValue"])) - if sWhat not in self.dTags: - self.dTags[sWhat] = [nTokenStart, nTokenStart] - else: - self.dTags[sWhat][0] = min(nTokenStart, self.dTags[sWhat][0]) - self.dTags[sWhat][1] = max(nTokenEnd, self.dTags[sWhat][1]) + for sTag in sWhat.split("|"): + if sTag not in self.dTags: + self.dTags[sTag] = [nTokenStart, nTokenEnd] + else: + self.dTags[sTag][0] = min(nTokenStart, self.dTags[sTag][0]) + self.dTags[sTag][1] = max(nTokenEnd, self.dTags[sTag][1]) elif cActionType == "!": # immunity if bDebug: echo(" IMMUNITY: " + sLineId + " / " + sRuleId) nTokenStart = nTokenOffset + eAct[0] if eAct[0] > 0 else nLastToken + eAct[0]