Skip to content

Commit

Permalink
Close #23: XH_highlightSearchWords() breaks Syntaxhighlighter
Browse files Browse the repository at this point in the history
We employ an ugly fix for a real problem, which may not be our problem,
though.
  • Loading branch information
cmb69 committed May 29, 2022
1 parent 5d8603c commit 5a87c67
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions syntaxhighlighter.min.js
Expand Up @@ -22,6 +22,10 @@
return;
}
document.addEventListener("DOMContentLoaded", function () {
Array.from(document.getElementsByClassName("brush:")).forEach(function (pre) {
// remove all HTML markup
pre.textContent = pre.textContent;
});
var aboutDialog = SyntaxHighlighter.config.strings.aboutDialog;
var brushes = JSON.parse(document.getElementsByName("syntaxhighlighter.brushes")[0].content);
SyntaxHighlighter.autoloader(...brushes);
Expand Down

0 comments on commit 5a87c67

Please sign in to comment.