mixmark-io / turndown

🛏 An HTML to Markdown converter written in JavaScript
https://mixmark-io.github.io/turndown
MIT License
8.52k stars 864 forks source link

Faithful mode #448

Open bjones1 opened 10 months ago

bjones1 commented 10 months ago

This PR adds what I call "faithful mode" -- if given HTML can't be exactly captured by Markdown, then this mode outputs the HTML instead. For example, the HTML snippet <em>Hello</em> becomes *Hello*, while <span id="foo">Hello</span> becomes Hello in standard Turndown, but stays as <span id="foo">Hello</span> in faithful mode.