Compare commits

...

2 commits

2 changed files with 19 additions and 6 deletions

View file

@ -255,19 +255,19 @@
"color": "rgb(225, 225, 225)"
},
"Teto Tuesday": {
"color": "rgb(255, 100, 100)",
"color": "#d5738d",
"caseInsensitive": true
},
"Teto Territory": {
"color": "rgb(255, 100, 100)",
"color": "#d5738d",
"caseInsensitive": true
},
"Teto": {
"color": "rgb(255, 100, 100)",
"color": "#d5738d",
"caseInsensitive": true
},
"Kasane": {
"color": "rgb(255, 100, 100)",
"color": "#d5738d",
"caseInsensitive": true
},
"Ryouiki Tenkai": {

View file

@ -119,10 +119,23 @@ function highlighter(json, full = true) {
spanEnd = element.content.length
}
var spanStart = element.content.substring(0, termIndex).lastIndexOf(" ") + 1
// if (highTable[index] == "ULTRAKILL") {
// console.log(startContent, " ---- ", endContent)
// }
var startContent = element.content.substring(spanStart - 1, termIndex)
var endContent = element.content.substring(termIndex + termKey.length, spanEnd)
var spanStart = element.content.substring(0, termIndex).lastIndexOf(" ") + 1
var startContent = element.content.substring(spanStart - 1, termIndex)
if (startContent.includes("(") && !endContent.includes(")")) {
spanEnd = element.content.indexOf(")", spanStart) + 1
endContent = element.content.substring(termIndex + termKey.length, spanEnd)
}
else if (endContent.includes(")") && !startContent.includes("(")) {
spanStart = element.content.substring(0, spanStart).lastIndexOf("(")
startContent = element.content.substring(spanStart - 1, termIndex)
}
var style = termProps.style || ""
var classes = termProps.classes || ""