fix: revert markdig escape for <mark> tags

This commit is contained in:
Oliver Booth 2023-08-08 02:11:12 +01:00
parent ea656f6513
commit 3c62a42d32
Signed by: oliverbooth
GPG Key ID: 725DB725A0D9EE61
1 changed files with 9 additions and 2 deletions

View File

@ -1,12 +1,19 @@
declare const bootstrap: any;
declare const bootstrap: any;
declare const katex: any;
(() => {
document.querySelectorAll("pre code").forEach((block) => {
const content = block.textContent;
let content = block.textContent;
if (content.split("\n").length > 1) {
block.parentElement.classList.add("line-numbers");
}
content = block.innerHTML;
// @ts-ignore
content = content.replaceAll("&lt;mark&gt;", "<mark>");
// @ts-ignore
content = content.replaceAll("&lt;/mark&gt;", "</mark>");
block.innerHTML = content;
});
document.querySelectorAll("img[title]").forEach((img) => {