para-cli 1.23.1 → 1.23.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +3 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -138,7 +138,7 @@ export function createAll(pc, input, flags) {
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
if (flags.sanitize) {
|
|
141
|
-
json.text = json.text.replace(
|
|
141
|
+
json.text = json.text.replace(/[^0-9\p{L}]+/giu, ' ').replace(/[\s]+/gi, ' ');
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
id = (i === 0 && flags.id) ? flags.id : (json.url || filePath);
|
|
@@ -783,7 +783,7 @@ function parseHTML(file) {
|
|
|
783
783
|
},
|
|
784
784
|
ontext: function (txt) {
|
|
785
785
|
if (!inScript && !inAnchor) {
|
|
786
|
-
text += txt;
|
|
786
|
+
text += ' ' + txt;
|
|
787
787
|
}
|
|
788
788
|
},
|
|
789
789
|
onclosetag: function () {
|
|
@@ -796,7 +796,7 @@ function parseHTML(file) {
|
|
|
796
796
|
return {
|
|
797
797
|
name: title,
|
|
798
798
|
url: url,
|
|
799
|
-
text: (text || '').replace(/[\s]+/gi, ' ')
|
|
799
|
+
text: (text || ' ').replace(/[\s]+/gi, ' ')
|
|
800
800
|
};
|
|
801
801
|
}
|
|
802
802
|
|