Code blocks can no longer be highlighted
This commit is contained in:
parent
0fa1f4727d
commit
ce0295ca7d
1 changed files with 5 additions and 1 deletions
|
@ -89,8 +89,8 @@ function highlighter(json, full = true) {
|
|||
var element = json[i]
|
||||
if (element.type == "element") {
|
||||
if (element.children.length > 0) {
|
||||
if (element.attributes) {
|
||||
var valid = true
|
||||
if (element.attributes) {
|
||||
for (var x in element.attributes) {
|
||||
var attribute = element.attributes[x]
|
||||
if (attribute.key == "class" && attribute.value == "value") {
|
||||
|
@ -100,6 +100,10 @@ function highlighter(json, full = true) {
|
|||
}
|
||||
}
|
||||
|
||||
if (element.tagName == "code") {
|
||||
valid = false
|
||||
}
|
||||
|
||||
if (valid) {
|
||||
element.children = highlighter(element.children, full)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue