Skip to content

Commit

Permalink
🚧 Fix word not hightlight.
Browse files Browse the repository at this point in the history
  • Loading branch information
tolerious committed Sep 25, 2024
1 parent b211d5b commit 8a7dc08
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plugins/general/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ function removeUnMarkedWord(word) {

function convertCurrentTextNodeContent(textNode, targetWordList) {
// 判断并找出当前文本节点中包含的目标单词
const textContent = textNode.textContent;
const textContent = textNode.textContent
.replaceAll("\n", " ")
.replaceAll("\t", " ");
const targetWordSet = new Set(targetWordList);
const splittedTextContentStringList = textContent.split(" ");
// 存放的是目标单词在splittedTextContentStringList中的索引
Expand Down

0 comments on commit 8a7dc08

Please sign in to comment.