miyuchina / mistletoe

A fast, extensible and spec-compliant Markdown parser in pure Python.
MIT License
841 stars 119 forks source link

Do not escape double or single quotes by default #181

Closed pbodnar closed 1 year ago

pbodnar commented 1 year ago

This follows #176 and makes output from HTMLRenderer shorter and more human-readable - by not escaping both double and single quotes by default.

I.e. instead of "something" we want to output "something".

If required, one can still force the HTMLRenderer (or any of its descendants) to escape either type of quotes:

with HTMLRenderer(html_escape_double_quotes=True, html_escape_single_quotes=True) as renderer:
    output = renderer.render(Document('"something"'))
pbodnar commented 1 year ago

Done.