Skip to content

Commit 578c70b

Browse files
Apply highlighting to parent element instead
1 parent c972033 commit 578c70b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

util/gh-pages/script.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ function onEachLazy(lazyArray, func) {
140140

141141
function highlightIfNeeded(elem) {
142142
onEachLazy(elem.querySelectorAll("pre > code.language-rust:not(.highlighted)"), el => {
143-
hljs.highlightElement(el)
143+
hljs.highlightElement(el.parentElement)
144144
el.classList.add("highlighted");
145145
});
146146
}

0 commit comments

Comments
 (0)