We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2ccfaad + 49ef7b6 commit 97b3806Copy full SHA for 97b3806
src/theme/book.js
@@ -162,12 +162,13 @@ function playground_text(playground) {
162
if (window.ace) {
163
// language-rust class needs to be removed for editable
164
// blocks or highlightjs will capture events
165
- Array
166
- .from(document.querySelectorAll('code.editable'))
+ code_nodes
+ .filter(function (node) {return node.classList.contains("editable"); })
167
.forEach(function (block) { block.classList.remove('language-rust'); });
168
169
Array
170
- .from(document.querySelectorAll('code:not(.editable)'))
171
+ .filter(function (node) {return !node.classList.contains("editable"); })
172
.forEach(function (block) { hljs.highlightBlock(block); });
173
} else {
174
code_nodes.forEach(function (block) { hljs.highlightBlock(block); });
0 commit comments