We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24b4b62 commit 93f69baCopy full SHA for 93f69ba
javascript/generateSearchData.js
@@ -146,12 +146,10 @@ function maintainTextTrie(arr) {
146
continue;
147
}
148
let line = childs[j]["body"];
149
- line = line.replace(/\n|\t/g, "");
150
- line = line.replace(/[^\w\s]/g, "");
151
- line = line.replace(/\s+/g," ").trim();
+ line = line.trim().replace(/\s+/g," ");
152
sentences[j]=line;
153
- line = line.toLowerCase();
154
- let words = line.split(" ");
+ line = line.toLowerCase().replace(/[^a-z0-9" "]/gi, "");
+ let words = line.split(" ").filter(a => a != "" && a != '\"');
155
for(let k =0; k<words.length; k++) {
156
const word = words[k];
157
0 commit comments