aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaylan Limberg <waylan.limberg@icloud.com>2016-04-11 19:37:21 -0400
committerWaylan Limberg <waylan.limberg@icloud.com>2016-04-11 19:37:21 -0400
commit39655907c8f68440e3895495b3ef7f23d169a73d (patch)
tree9a29ef926df6c49ba06cb66a0bc1fc3e39c2cfdf
parentfcd4951af0fc4701a87f94925ea726625205a0ad (diff)
parent4d96f00fd3e4945b5c18d53ea81868bee5486c98 (diff)
downloadmarkdown-39655907c8f68440e3895495b3ef7f23d169a73d.tar.gz
markdown-39655907c8f68440e3895495b3ef7f23d169a73d.tar.bz2
markdown-39655907c8f68440e3895495b3ef7f23d169a73d.zip
Merge branch 'master' of https://github.com/waylan/Python-Markdown
-rw-r--r--docs/reference.txt4
-rw-r--r--markdown/extensions/fenced_code.py1
-rw-r--r--tests/test_extensions.py12
3 files changed, 15 insertions, 2 deletions
diff --git a/docs/reference.txt b/docs/reference.txt
index ac5c724..7268cc6 100644
--- a/docs/reference.txt
+++ b/docs/reference.txt
@@ -247,8 +247,8 @@ The following options are available on the `markdown.markdown` function:
If `lazy_ol` is set to `False`, then markdown will output the following
HTML:
- <ol>
- <li start="4">Apples</li>
+ <ol start="4">
+ <li>Apples</li>
<li>Oranges</li>
<li>Pears</li>
</ol>
diff --git a/markdown/extensions/fenced_code.py b/markdown/extensions/fenced_code.py
index 4af8891..8c9935e 100644
--- a/markdown/extensions/fenced_code.py
+++ b/markdown/extensions/fenced_code.py
@@ -81,6 +81,7 @@ class FencedBlockPreprocessor(Preprocessor):
guess_lang=self.codehilite_conf['guess_lang'][0],
css_class=self.codehilite_conf['css_class'][0],
style=self.codehilite_conf['pygments_style'][0],
+ use_pygments=self.codehilite_conf['use_pygments'][0],
lang=(m.group('lang') or None),
noclasses=self.codehilite_conf['noclasses'][0],
hl_lines=parse_hl_lines(m.group('hl_lines'))
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. """