Some browsers insert a line break between : and —. This can be averted
by inserting a U+2060 WORD JOINER between them, which is easy to
automate during site generation.
}
} else if (node.nodeType == 1) {
Array.from(node.childNodes).forEach(applyHighlighting);
}
} else if (node.nodeType == 1) {
Array.from(node.childNodes).forEach(applyHighlighting);
+ } else if (node.nodeType == 3) {
+ node.textContent = node.textContent.replaceAll(":—", ":\u2060—");