Browse Source

feat: 调整高亮跳过类名

zhangyuhan 1 tháng trước cách đây
mục cha
commit
701af70656
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      resource/staticres/js/common.js

+ 1 - 1
resource/staticres/js/common.js

@@ -142,7 +142,7 @@ function replaceKeywordWithRichText (htmlString, keyword, richChar) {
       node.parentNode.replaceChild(frag, node)
     } else if (node.nodeType === Node.ELEMENT_NODE) {
       // 如果是元素节点,递归其子节点
-      var skipClassName = ['keyword', 'highlight-text']
+      var skipClassName = ['highlight-text']
       var skip = skipClassName.some(sk => node.className.indexOf(sk) !== -1)
       // 跳过已经高亮的元素子节点
       if (!skip) {