Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,8 @@ const HLJS = function(hljs) {
{ el: element, language });

if (element.dataset.highlighted) {
console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", element);
// Already highlighted - skip to avoid false "unescaped HTML" warnings
// caused by hljs's own <span> tags from previous highlighting
return;
}

Expand Down