From 3b6e7493460aea4f0b983586664ecfaee66e4a1e Mon Sep 17 00:00:00 2001 From: 540497900 <540497900@qq,com> Date: Tue, 14 Jun 2022 13:19:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=91=E4=BB=AC=E6=8A=8Ahighlight.js?= =?UTF-8?q?=E9=87=8C=E9=9D=A2=E7=9A=84=E5=86=85=E5=AE=B9=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E4=BA=86=E4=B8=80=E5=AE=9A=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/static/js/highlight.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/static/js/highlight.js b/app/static/js/highlight.js index 2e0d84a..0327f8c 100644 --- a/app/static/js/highlight.js +++ b/app/static/js/highlight.js @@ -39,9 +39,6 @@ function highLight() { var list2 = sel_word2.value.split(" "); for (var i = 0; i < list2.length; ++i) { list2[i] = list2[i].replace(/(^\s*)|(\s*$)/g, ""); - if (list2[i] != "" && "".indexOf(list2[i]) == -1 && "".indexOf(list2[i]) == -1) { - txt = txt.replace(new RegExp(list2[i], "g"), "" + list2[i] + ""); - } } } document.getElementById("article").innerHTML = txt; -- 2.17.1