247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
|
["etc", true],
["missing_hyphens", true],
["ma_word", true],
["ma_1letter_lowercase", false],
["ma_1letter_uppercase", false]
]);
const dOptions = dDefaultOptions._shallowCopy();
class TextFormatter {
constructor () {
this.sLang = "fr";
};
formatText (sText, dOpt=null) {
if (dOpt !== null) {
dOptions._updateOnlyExistingKeys(dOpt);
}
for (let [sOptName, bVal] of dOptions) {
if (bVal && oReplTable.has(sOptName)) {
for (let [zRgx, sRep] of oReplTable[sOptName]) {
sText = sText.replace(zRgx, sRep);
}
}
|
|
|
|
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
|
["etc", true],
["missing_hyphens", true],
["ma_word", true],
["ma_1letter_lowercase", false],
["ma_1letter_uppercase", false]
]);
const dOptions = dDefaultOptions.gl_shallowCopy();
class TextFormatter {
constructor () {
this.sLang = "fr";
};
formatText (sText, dOpt=null) {
if (dOpt !== null) {
dOptions.gl_updateOnlyExistingKeys(dOpt);
}
for (let [sOptName, bVal] of dOptions) {
if (bVal && oReplTable.has(sOptName)) {
for (let [zRgx, sRep] of oReplTable[sOptName]) {
sText = sText.replace(zRgx, sRep);
}
}
|