mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-10 19:56:59 +03:00
Use markdown 2.6 extension_configs to configure extension
This commit is contained in:
parent
d9d34e4886
commit
b2e74fb523
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user