markdown: note about the escape_html_text wrapper

Signed-off-by: Conrad Hoffmann <ch@bitfehler.net>
This commit is contained in:
Conrad Hoffmann 2023-11-16 11:13:00 +01:00
parent 20a1381512
commit c13da7cbf7
1 changed files with 2 additions and 0 deletions

View File

@ -129,6 +129,8 @@ class SrhtRenderer(m.HTMLRenderer):
return template.format(level=level, inner=inner, _id=_id)
def escape_html_text(self, value):
# This wrapper handles a name change introduced in mistletoe v1.1.0.
# It can simply be removed once backwards compatibility is no longer needed.
sup = super()
if hasattr(sup, 'escape_html_text'):
return sup.escape_html_text(value)