From 4d8d36eaf6a6302e74f24e36bacf806bca0281db Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Sat, 5 Apr 2025 12:53:35 -0600 Subject: [PATCH] htmlToMarkdown: remove escapes when comparing content and link --- src/util/html.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/util/html.js b/src/util/html.js index d65e575..782b107 100644 --- a/src/util/html.js +++ b/src/util/html.js @@ -58,7 +58,10 @@ function whenYouWalking(tree, images = true, embed = true) { if (link == null || !link.startsWith("http")) { str += content; - } else if (content == link || link.replace(/^https?:\/\//, "") == content) { + } else if ( + content.replaceAll("\\", "") == link || + link.replace(/^https?:\/\//, "") == content.replaceAll("\\", "") + ) { str += embed ? link : `<${link}>`; } else { str += `[${content.replaceAll("\\", "")}](${embed ? "" : "<"}${link}${embed ? "" : ">"}${