Remove parenthesis highlighting

This commit is contained in:
bingus_violet 2024-09-10 00:34:20 -05:00
parent b76b32aa51
commit 6f2b40d75a

View file

@ -162,14 +162,14 @@ function highlighter(json, full = true, linkParent = false) {
var startContent = element.content.substring(spanStart - 1, termIndex) var startContent = element.content.substring(spanStart - 1, termIndex)
var endContent = element.content.substring(termIndex + termKey.length, spanEnd) var endContent = element.content.substring(termIndex + termKey.length, spanEnd)
if (startContent.includes("(") && !endContent.includes(")")) { // if (startContent.includes("(") && !endContent.includes(")")) {
spanEnd = element.content.indexOf(")", spanStart) + 1 // spanEnd = element.content.indexOf(")", spanStart) + 1
endContent = element.content.substring(termIndex + termKey.length, spanEnd) // endContent = element.content.substring(termIndex + termKey.length, spanEnd)
} // }
else if (endContent.includes(")") && !startContent.includes("(")) { // else if (endContent.includes(")") && !startContent.includes("(")) {
spanStart = element.content.substring(0, spanStart).lastIndexOf("(") // spanStart = element.content.substring(0, spanStart).lastIndexOf("(")
startContent = element.content.substring(spanStart - 1, termIndex) // startContent = element.content.substring(spanStart - 1, termIndex)
} // }
var style = termProps.style || "" var style = termProps.style || ""
var classes = termProps.classes || "" var classes = termProps.classes || ""