mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Update docs and tests for MARKDOWN_EXTENTIONS
This commit is contained in:
parent
226aa2d8f3
commit
45c836fdf5
5 changed files with 30 additions and 9 deletions
|
|
@ -90,3 +90,22 @@ class MdReaderTest(unittest.TestCase):
|
|||
"<p>This is another markdown test file. Uses the mkd extension.</p>"
|
||||
|
||||
self.assertEqual(content, expected)
|
||||
|
||||
@unittest.skipUnless(readers.Markdown, "markdown isn't installed")
|
||||
def test_article_with_markdown_markup_extension(self):
|
||||
# test to ensure the markdown markup extension is being processed as expected
|
||||
reader = readers.MarkdownReader({})
|
||||
reader.settings.update(dict(MARKDOWN_EXTENTIONS=['toc']))
|
||||
content, metadata = reader.read(_filename('article_with_markdown_markup_extentions.md'))
|
||||
expected = '<div class="toc">\n'\
|
||||
'<ul>\n'\
|
||||
'<li><a href="#level1">Level1</a><ul>\n'\
|
||||
'<li><a href="#level2">Level2</a></li>\n'\
|
||||
'</ul>\n'\
|
||||
'</li>\n'\
|
||||
'</ul>\n'\
|
||||
'</div>\n'\
|
||||
'<h2 id="level1">Level1</h2>\n'\
|
||||
'<h3 id="level2">Level2</h3>'
|
||||
|
||||
self.assertEqual(content, expected)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue