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 @@ -263,11 +263,12 @@ } if (sText.includes("‑")) { sText = sText.replace(/‑/g, "-"); // Non-Breaking Hyphen (U+2011) } if (sText.includes("@@")) { - sText = sText.replace(/@@+/g, ""); + sText = sText.replace(/@@+/g, (sMatch, nOffest, sSource) => { return " ".repeat(sMatch.length) }); + // function as replacement: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace } return sText; } parseText (sText, sText0, bParagraph, nOffset, sCountry, dOptions, bShowRuleId, bDebug, bContext) { 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 @@ -312,11 +312,12 @@ if "‐" in sText: sText = sText.replace("‐", "-") # Hyphen (U+2010) if "‑" in sText: sText = sText.replace("‑", "-") # Non-Breaking Hyphen (U+2011) if "@@" in sText: - sText = re.sub("@@+", "", sText) + sText = re.sub("@@+", lambda m: " " * len(m.group(0)), sText) + # function as replacement: https://docs.python.org/3.7/library/re.html#re.sub return sText def parseText (self, sText, sText0, bParagraph, nOffset, sCountry, dOptions, bShowRuleId, bDebug, bContext): "parse the text with rules" bChange = False