markdown: fix name shadowing

This commit is contained in:
Conrad Hoffmann 2024-01-09 12:19:31 +01:00
parent aa38fcfc88
commit 37f5c27cbf
1 changed files with 2 additions and 2 deletions

View File

@ -242,11 +242,11 @@ def add_noopener(html):
a['rel'] = 'nofollow noopener'
return str(soup)
def markdown(text, baselevel=1, link_prefix=None, with_styles=True, sanitize=True):
def markdown(text, baselevel=1, link_prefix=None, with_styles=True, sanitize_output=True):
text = text.replace("\r\n", "\n") # https://github.com/miyuchina/mistletoe/issues/124
with SrhtRenderer(link_prefix, baselevel) as renderer:
html = renderer.render(m.Document(text))
if sanitize:
if sanitize_output:
html = sanitize(html)
if with_styles:
style = ".highlight { background: inherit; }"