261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
|
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
|
-
+
+
|
if (sText.includes("‐")) {
sText = sText.replace(/‐/g, "-"); // Hyphen (U+2010)
}
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) {
let bChange = false;
let m;
|