|
@@ -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) {
|