fix: fix already-formatted <mark>
no really, I hate this.
This commit is contained in:
parent
086a8a665c
commit
cf615e1e81
@ -193,6 +193,11 @@ class UI {
|
||||
element = element || document.body;
|
||||
element.querySelectorAll("pre code").forEach((block) => {
|
||||
let content = block.innerHTML;
|
||||
|
||||
// but ugly fucking hack. I hate this
|
||||
content = content.replaceAll('<span class="token operator"><</span>mark<span class="token operator">></span>', "<mark>");
|
||||
content = content.replaceAll('<span class="token operator"><</span><span class="token operator">/</span>mark<span class="token operator">></span>', "</mark>");
|
||||
|
||||
content = content.replaceAll("<mark>", "<mark>");
|
||||
content = content.replaceAll("</mark>", "</mark>");
|
||||
block.innerHTML = content;
|
||||
|
Loading…
Reference in New Issue
Block a user