Compare commits

..

2 commits

2 changed files with 19 additions and 6 deletions

View file

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

View file

@ -119,10 +119,23 @@ function highlighter(json, full = true) {
spanEnd = element.content.length 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 endContent = element.content.substring(termIndex + termKey.length, spanEnd)
var spanStart = element.content.substring(0, termIndex).lastIndexOf(" ") + 1 if (startContent.includes("(") && !endContent.includes(")")) {
var startContent = element.content.substring(spanStart - 1, termIndex) 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 style = termProps.style || ""
var classes = termProps.classes || "" var classes = termProps.classes || ""