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 4ef3def commit db428c5Copy full SHA for db428c5
misc/highlight.js
@@ -93,7 +93,12 @@
93
for (let ti = 0; ti < tags.length; ti++) {
94
let pNodes = document.getElementsByTagName(tags[ti]);
95
for (let i = 0; i < pNodes.length; i++) {
96
- let text = pNodes[i].innerHTML;
+ let text = pNodes[i].innerText.trim();
97
+ if (text === "") {
98
+ continue;
99
+ }
100
+
101
+ text = pNodes[i].innerHTML;
102
103
for (let j = 0; j < words.length; j++) {
104
text = text.highlight(words[j], color);
0 commit comments