Code blocks can no longer be highlighted

This commit is contained in:
bingus_violet 2024-07-12 19:19:49 -05:00
parent 0fa1f4727d
commit ce0295ca7d

View file

@ -89,8 +89,8 @@ function highlighter(json, full = true) {
var element = json[i]
if (element.type == "element") {
if (element.children.length > 0) {
var valid = true
if (element.attributes) {
var valid = true
for (var x in element.attributes) {
var attribute = element.attributes[x]
if (attribute.key == "class" && attribute.value == "value") {
@ -99,6 +99,10 @@ function highlighter(json, full = true) {
}
}
}
if (element.tagName == "code") {
valid = false
}
if (valid) {
element.children = highlighter(element.children, full)