Skip to content

Commit

Permalink
fix: Remove extra html when text is not highlighted (#1904)
Browse files Browse the repository at this point in the history
fix: Remove html when text is not highlighted

closes #1758

This PR removes extra html when text is not highlighted
  • Loading branch information
leiyre committed Nov 15, 2022
1 parent 341c581 commit 7858dc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/plugins/highlight-search.js
Expand Up @@ -53,7 +53,7 @@ export default (context, inject) => {

function replaceText(regex, text) {
return htmlText(text).replace(regex, (matched) =>
htmlHighlightText(matched)
matched ? htmlHighlightText(matched) : matched
);
}

Expand Down

0 comments on commit 7858dc5

Please sign in to comment.