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