mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Avoid Markdown 2.6 deprecations; make MD_EXTENSIONS a dict
* Make MD_EXTENSIONS setting a dict and add tests for this change;
* Short extension names ('extra', 'meta') are deprecated
https://pythonhosted.org/Markdown/release-2.6.html#shortened-extension-names-deprecated
* Extension config as part of extension name is deprecated
https://pythonhosted.org/Markdown/release-2.6.html#extension-configuration-as-part-of-extension-name-deprecated
This commit is contained in:
parent
a2852da3e7
commit
510961bbb9
6 changed files with 51 additions and 15 deletions
|
|
@ -50,7 +50,10 @@ Take a look at the Markdown reader::
|
|||
def read(self, source_path):
|
||||
"""Parse content and metadata of markdown files"""
|
||||
text = pelican_open(source_path)
|
||||
md = Markdown(extensions = ['meta', 'codehilite'])
|
||||
md_extensions = {'markdown.extensions.meta': {},
|
||||
'markdown.extensions.codehilite': {}}
|
||||
md = Markdown(extensions=md_extensions.keys(),
|
||||
extension_configs=md_extensions)
|
||||
content = md.convert(text)
|
||||
|
||||
metadata = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue