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:
Kernc 2015-11-08 23:08:03 +01:00
commit 510961bbb9
6 changed files with 51 additions and 15 deletions

View file

@ -471,7 +471,12 @@ class MdReaderTest(ReaderTest):
# expected
page = self.read_file(
path='article_with_markdown_markup_extensions.md',
MD_EXTENSIONS=['toc', 'codehilite', 'extra'])
MD_EXTENSIONS={
'markdown.extensions.toc': {},
'markdown.extensions.codehilite': {},
'markdown.extensions.extra': {}
}
)
expected = ('<div class="toc">\n'
'<ul>\n'
'<li><a href="#level1">Level1</a><ul>\n'