Merge pull request #1613 from FWYongxing/master
Don't highlight `inline code` blocks in headers with output.html. playpen(playgroud).editable=true
This commit is contained in:
commit
97b38063b1
|
@ -162,12 +162,13 @@ function playground_text(playground) {
|
||||||
if (window.ace) {
|
if (window.ace) {
|
||||||
// language-rust class needs to be removed for editable
|
// language-rust class needs to be removed for editable
|
||||||
// blocks or highlightjs will capture events
|
// blocks or highlightjs will capture events
|
||||||
Array
|
code_nodes
|
||||||
.from(document.querySelectorAll('code.editable'))
|
.filter(function (node) {return node.classList.contains("editable"); })
|
||||||
.forEach(function (block) { block.classList.remove('language-rust'); });
|
.forEach(function (block) { block.classList.remove('language-rust'); });
|
||||||
|
|
||||||
Array
|
Array
|
||||||
.from(document.querySelectorAll('code:not(.editable)'))
|
code_nodes
|
||||||
|
.filter(function (node) {return !node.classList.contains("editable"); })
|
||||||
.forEach(function (block) { hljs.highlightBlock(block); });
|
.forEach(function (block) { hljs.highlightBlock(block); });
|
||||||
} else {
|
} else {
|
||||||
code_nodes.forEach(function (block) { hljs.highlightBlock(block); });
|
code_nodes.forEach(function (block) { hljs.highlightBlock(block); });
|
||||||
|
|
Loading…
Reference in New Issue