Compare commits

...

1 Commits

Author SHA1 Message Date
540497900 3b6e749346 我们把highlight.js里面的内容进行了一定的修改 2022-06-14 13:19:56 +08:00
1 changed files with 0 additions and 3 deletions

View File

@ -39,9 +39,6 @@ function highLight() {
var list2 = sel_word2.value.split(" "); var list2 = sel_word2.value.split(" ");
for (var i = 0; i < list2.length; ++i) { for (var i = 0; i < list2.length; ++i) {
list2[i] = list2[i].replace(/(^\s*)|(\s*$)/g, ""); list2[i] = list2[i].replace(/(^\s*)|(\s*$)/g, "");
if (list2[i] != "" && "<mark>".indexOf(list2[i]) == -1 && "</mark>".indexOf(list2[i]) == -1) {
txt = txt.replace(new RegExp(list2[i], "g"), "<mark>" + list2[i] + "</mark>");
}
} }
} }
document.getElementById("article").innerHTML = txt; document.getElementById("article").innerHTML = txt;