diff options
author | Martin Morgenstern <mail@mmorgenstern.net> | 2016-04-11 11:27:04 +0200 |
---|---|---|
committer | Martin Morgenstern <mail@mmorgenstern.net> | 2016-04-11 11:34:43 +0200 |
commit | c5cd162cb6a071b9a6ef679571a5b1d80d46fde9 (patch) | |
tree | c4d583598333a6f32f0f415148234360fbe7facf | |
parent | 882ce66dfde4c2bdd1df208f2368736301398b3c (diff) | |
download | markdown-c5cd162cb6a071b9a6ef679571a5b1d80d46fde9.tar.gz markdown-c5cd162cb6a071b9a6ef679571a5b1d80d46fde9.tar.bz2 markdown-c5cd162cb6a071b9a6ef679571a5b1d80d46fde9.zip |
Test if fenced_code honors CodeHilite option use_pygments
-rw-r--r-- | tests/test_extensions.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_extensions.py b/tests/test_extensions.py index 19a1389..a43de79 100644 --- a/tests/test_extensions.py +++ b/tests/test_extensions.py @@ -375,6 +375,18 @@ line 3 '#line 3</code></pre>' ) + def testFencedLanguageAndPygmentsDisabled(self): + """ Test if fenced_code honors CodeHilite option use_pygments=False. """ + + text = '```python\nfrom __future__ import braces\n```' + md = markdown.Markdown( + extensions=[ + markdown.extensions.codehilite.CodeHiliteExtension(use_pygments=False), + 'markdown.extensions.fenced_code' + ] + ) + self.assertTrue('<code class="language-python">' in md.convert(text)) + class TestHeaderId(unittest.TestCase): """ Test HeaderId Extension. """ |