diff --git a/blag/markdown.py b/blag/markdown.py index 4dab425..328b0d0 100644 --- a/blag/markdown.py +++ b/blag/markdown.py @@ -30,7 +30,7 @@ def markdown_factory(): """ md = Markdown( extensions=[ - 'meta', 'fenced_code', 'codehilite', + 'meta', 'fenced_code', 'codehilite', 'smarty', MarkdownLinkExtension() ], output_format='html5', diff --git a/blag/version.py b/blag/version.py index b282d03..1a3480b 100644 --- a/blag/version.py +++ b/blag/version.py @@ -1 +1 @@ -__VERSION__ = '0.0.7' +__VERSION__ = '0.0.8' diff --git a/tests/test_markdown.py b/tests/test_markdown.py index 639e3ef..602824e 100644 --- a/tests/test_markdown.py +++ b/tests/test_markdown.py @@ -49,3 +49,31 @@ def test_convert_metadata(input_, expected): def test_markdown_factory(): md = markdown_factory() assert isinstance(md, markdown.Markdown) + + +def test_smarty(): + md = markdown_factory() + + md1 = """ + +this --- is -- a test ... + + """ + html, meta = convert_markdown(md, md1) + assert 'mdash' in html + assert 'ndash' in html + assert 'hellip' in html + + +def test_smarty_code(): + md = markdown_factory() + + md1 = """ +``` +this --- is -- a test ... +``` + """ + html, meta = convert_markdown(md, md1) + assert 'mdash' not in html + assert 'ndash' not in html + assert 'hellip' not in html