1
0
mirror of https://github.com/coalaura/whiskr.git synced 2025-09-08 00:29:54 +00:00
This commit is contained in:
Laura
2025-08-15 03:38:24 +02:00
parent 3adaa69bc0
commit 75a9d893c3
5 changed files with 115 additions and 3 deletions

View File

@@ -10,7 +10,13 @@
walkTokens: (token) => {
const { type, lang, text } = token;
if (type !== "code") {
if (type === "html") {
token.text = token.text.replace(/&/g, "&")
token.text = token.text.replace(/</g, "&lt;")
token.text = token.text.replace(/>/g, "&gt;")
return;
} else if (type !== "code") {
return;
}