Mercurial > libervia-backend
comparison sat/plugins/plugin_misc_text_syntaxes.py @ 4059:00dbc3370d35
plugin text syntaxes: fix `EscapeHTML` following massive snake_case renaming
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 29 May 2023 17:52:25 +0200 |
parents | 524856bd7b19 |
children |
comparison
equal
deleted
inserted
replaced
4058:adb9dc9c8114 | 4059:00dbc3370d35 |
---|---|
215 from markdown.extensions import Extension | 215 from markdown.extensions import Extension |
216 | 216 |
217 # XXX: we disable raw HTML parsing by default, to avoid parsing error | 217 # XXX: we disable raw HTML parsing by default, to avoid parsing error |
218 # when the user is not aware of markdown and HTML | 218 # when the user is not aware of markdown and HTML |
219 class EscapeHTML(Extension): | 219 class EscapeHTML(Extension): |
220 def extend_markdown(self, md): | 220 def extendMarkdown(self, md): |
221 md.preprocessors.deregister('html_block') | 221 md.preprocessors.deregister('html_block') |
222 md.inlinePatterns.deregister('html') | 222 md.inlinePatterns.deregister('html') |
223 | 223 |
224 def _html2text(html, baseurl=""): | 224 def _html2text(html, baseurl=""): |
225 h = html2text.HTML2Text(baseurl=baseurl) | 225 h = html2text.HTML2Text(baseurl=baseurl) |