254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
|
const dTFOptions = dTFDefaultOptions.gl_shallowCopy();
class TextFormatter {
constructor () {
this.sLang = "fr";
};
formatText (sText, dOpt=null) {
if (dOpt !== null) {
dTFOptions.gl_updateOnlyExistingKeys(dOpt);
}
for (let [sOptName, bVal] of dTFOptions) {
if (bVal && oReplTable.has(sOptName)) {
for (let [zRgx, sRep] of oReplTable[sOptName]) {
sText = sText.replace(zRgx, sRep);
}
}
}
return sText;
};
getDefaultOptions () {
return dTFDefaultOptions;
}
}
|
<
>
<
>
|
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
|
const dTFOptions = dTFDefaultOptions.gl_shallowCopy();
class TextFormatter {
constructor () {
this.sLang = "fr";
}
formatText (sText, dOpt=null) {
if (dOpt !== null) {
dTFOptions.gl_updateOnlyExistingKeys(dOpt);
}
for (let [sOptName, bVal] of dTFOptions) {
if (bVal && oReplTable.has(sOptName)) {
for (let [zRgx, sRep] of oReplTable[sOptName]) {
sText = sText.replace(zRgx, sRep);
}
}
}
return sText;
}
getDefaultOptions () {
return dTFDefaultOptions;
}
}
|