414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
|
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
|
-
-
+
+
-
+
-
+
|
let iParagraph = 0; // index of paragraphs, used for identification
let nParagraph = 0; // non empty paragraphs
let sRes = "";
try {
sText = sText.normalize("NFC"); // remove combining diacritics
for (let sParagraph of text.getParagraph(sText)) {
if (sParagraph.trim() !== "") {
sRes = await xGCEWorker.post('parseAndGenerateParagraph', [sParagraph, iParagraph, "FR", false])
xGCPanel.port.emit("addElem", sRes);
sRes = await xGCEWorker.post('parseAndSpellcheck', [sParagraph, "FR", false, false]);
xGCPanel.port.emit("addParagraph", sParagraph, iParagraph, sRes);
nParagraph += 1;
}
iParagraph += 1;
}
xGCPanel.port.emit("addElem", '<p class="message">' + _("numberOfParagraphs") + " " + nParagraph + '</p>');
xGCPanel.port.emit("addMessage", 'message', _("numberOfParagraphs") + " " + nParagraph);
}
catch (e) {
xGCPanel.port.emit("addElem", '<p class="bug">' + e.message + '</p>');
xGCPanel.port.emit("addMessage", 'bug', e.message);
}
xGCPanel.port.emit("end");
}
/*
Text Formatter
|