60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
+
-
+
+
|
},
setParagraph: function (iParagraph, sParagraph) {
this.dParagraphs.set(iParagraph, this.purgeText(sParagraph).normalize("NFC"));
},
purgeText: function (sText) {
console.log(sText);
return sText.replace(/ /g, " ").replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&").replace(/\r\n/g, "\n").replace(/\r/g, "\n");
// return sText.replace(/ /g, " ").replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&").replace(/\r\n/g, "\n").replace(/\r/g, "\n"); // probably useless now
return sText.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
},
clear: function () {
this.dParagraphs.clear();
}
}
|