aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Morgenstern <mail@mmorgenstern.net>2016-04-11 11:27:04 +0200
committerMartin Morgenstern <mail@mmorgenstern.net>2016-04-11 11:34:43 +0200
commitc5cd162cb6a071b9a6ef679571a5b1d80d46fde9 (patch)
treec4d583598333a6f32f0f415148234360fbe7facf /tests
parent882ce66dfde4c2bdd1df208f2368736301398b3c (diff)
downloadmarkdown-c5cd162cb6a071b9a6ef679571a5b1d80d46fde9.tar.gz
markdown-c5cd162cb6a071b9a6ef679571a5b1d80d46fde9.tar.bz2
markdown-c5cd162cb6a071b9a6ef679571a5b1d80d46fde9.zip
Test if fenced_code honors CodeHilite option use_pygments
Diffstat (limited to 'tests')
-rw-r--r--tests/test_extensions.py12
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. """