We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26d76cb commit e9da175Copy full SHA for e9da175
src/contrib/highlight.js
@@ -25,7 +25,7 @@ var highlight = function($element, pattern) {
25
middlebit.parentNode.replaceChild(spannode, middlebit);
26
skip = 1;
27
}
28
- } else if (node.nodeType === 1 && node.childNodes && !/(script|style)/i.test(node.tagName)) {
+ } else if (node.nodeType === 1 && node.childNodes && !/(script|style)/i.test(node.tagName) && ( node.className !== 'highlight' || node.tagName !== 'SPAN' )) {
29
for (var i = 0; i < node.childNodes.length; ++i) {
30
i += highlight(node.childNodes[i]);
31
0 commit comments