FSX / misaka

A Python binding for Hoedown.
http://misaka.61924.nl
MIT License
418 stars 65 forks source link

HTML escaping question #61

Closed hetsch closed 5 years ago

hetsch commented 7 years ago

Hello Frank,

this is more a question than an issue. Let's assume that I use as source file Markdown Documentation - Basics.text and as expected result Markdown Documentation - Basics.html from your test suite folder. Everything works really smoothly, but I have no idea how to turn off HTML escaping. As far as I've understood the documentation, it should be disabled by default and only enabled, if the render flag HTML_ESCAPE is set.

The pseudo code

assert misaka.html(source_text, extensions=0, render_flags=0) == result_text

provides me following error:

AssertionError: assert '<h1>Markdown...code></pre>\n' == '<h1>Markdown:...code></pre>\n'
Skipping 524 identical leading characters in diff, use -v to show
- f Markdown&rsquo;s Formatting Syntax</h2>
?           ^^ -----
+ f Markdown's Formatting Syntax</h2>
?           ^

- <p>This page offers a brief overview of what it&rsquo;s like to use Markdown.
?                                                ^^ -----
+ <p>This page offers a brief overview of what it's like to use Markdown.

My question would be how to turn off default auto-escaping? Or am I'm deeply misunderstanding something?

FSX commented 5 years ago

Sorry. Was busy.