markdown: fix name shadowing
This commit is contained in:
parent
aa38fcfc88
commit
37f5c27cbf
|
@ -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; }"
|
||||
|
|
Loading…
Reference in New Issue