Fix screwed up links, add possible highlight overwrite
This commit is contained in:
parent
9ac680d5af
commit
48ea1dbd7f
2 changed files with 6 additions and 3 deletions
|
@ -56,7 +56,10 @@ function converter(html) {
|
|||
for (let index = 0; index < highTable.length; index++) {
|
||||
var term = highTable[index];
|
||||
var replacement = `<span style="color: ${highlightedWords[term]}">${term}</span>`
|
||||
|
||||
bodyHTML = bodyHTML.replaceAll(`{${term}}`, "TEMPORARY_REPLACE")
|
||||
bodyHTML = bodyHTML.replaceAll(term, replacement)
|
||||
bodyHTML = bodyHTML.replaceAll("TEMPORARY_REPLACE", `{${term}}`)
|
||||
}
|
||||
|
||||
html = html.substring(0, html.indexOf("<body>")) + bodyHTML + html.substring(html.indexOf("</body>") + 7)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue