This commit is contained in:
Cynthia Foxwell 2025-03-29 10:05:21 -06:00
parent f86e33ef3e
commit 38ef4d1c2f
Signed by: Cynosphere
SSH key fingerprint: SHA256:H3SM8ufP/uxqLwKSH7xY89TDnbR9uOHzjLoBr0tlajk

View file

@ -69,6 +69,7 @@ function htmlToMarkdown(str, images = true, embed = true) {
.replace(/<\/li>/gi, "\n")
.replaceAll("\n\n", "\n");
});
str = str.replace(/<\/?span(\s*[^>]+)?>/gi, "");
str = str.replace(/<\/?code(\s*[^>]+)?>/gi, "`");
str = str.replace(/<\/?em(\s*[^>]+)?>/gi, "_");
str = str.replace(/<\/?i(\s*[^>]+)?>/gi, "_");