htmlToMarkdown: unescape masked links

This commit is contained in:
Cynthia Foxwell 2025-04-05 10:42:18 -06:00
parent c6bbdaa69c
commit a2f4344f5c
Signed by: Cynosphere
SSH key fingerprint: SHA256:H3SM8ufP/uxqLwKSH7xY89TDnbR9uOHzjLoBr0tlajk

View file

@ -61,7 +61,9 @@ function whenYouWalking(tree, images = true, embed = true) {
} else if (content == link || link.replace(/^https?:\/\//, "") == content) { } else if (content == link || link.replace(/^https?:\/\//, "") == content) {
str += embed ? link : `<${link}>`; str += embed ? link : `<${link}>`;
} else { } else {
str += `[${content}](${embed ? "" : "<"}${link}${embed ? "" : ">"}${alt != null ? ` "${alt}"` : ""})`; str += `[${content.replaceAll("\\", "")}](${embed ? "" : "<"}${link}${embed ? "" : ">"}${
alt != null ? ` "${alt}"` : ""
})`;
} }
} else if (elem.b) { } else if (elem.b) {
str += `**${whenYouWalking(elem.b, images, embed)}**`; str += `**${whenYouWalking(elem.b, images, embed)}**`;