Use markdown 2.6 extension_configs to configure extension

This commit is contained in:
Michael J. Schultz 2015-11-05 10:52:31 -06:00
parent d9d34e4886
commit b2e74fb523

View File

@ -159,8 +159,15 @@ try:
of '#' style headers to <h2>.
"""
extensions = ['markdown.extensions.headerid(level=2)']
md = markdown.Markdown(extensions=extensions)
extensions = ['markdown.extensions.headerid']
extension_configs = {
'markdown.extensions.headerid': {
'level': '2'
}
}
md = markdown.Markdown(
extensions=extensions, extension_configs=extension_configs
)
return md.convert(text)
except ImportError:
apply_markdown = None