Skip to content

Commit

Permalink
remove backslashes from escaped text that is exported
Browse files Browse the repository at this point in the history
  • Loading branch information
blackforestboi committed Jul 20, 2024
1 parent fb5520d commit f7a3c2b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/background-script/html-to-markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ export function htmlToMarkdown(

let markdown = turndownService.turndown(doc)

// Replace escaped double brackets with unescaped double brackets
markdown = markdown.replace(/\\\[\\\[/g, '[[')
markdown = markdown.replace(/\\\]\\\]/g, ']]')
// Replace escaped backslashes with nothing
markdown = markdown.replace(/\\(.)/g, '$1')

return markdown
}

0 comments on commit f7a3c2b

Please sign in to comment.