1
0
mirror of https://github.com/venthur/blag.git synced 2025-11-25 12:42:41 +00:00

Compare commits

...

1 Commits
0.0.7 ... 0.0.8

Author SHA1 Message Date
Bastian Venthur
79edd04ee8 added smartypants support 2021-04-18 13:03:05 +02:00
3 changed files with 30 additions and 2 deletions

View File

@@ -30,7 +30,7 @@ def markdown_factory():
"""
md = Markdown(
extensions=[
'meta', 'fenced_code', 'codehilite',
'meta', 'fenced_code', 'codehilite', 'smarty',
MarkdownLinkExtension()
],
output_format='html5',

View File

@@ -1 +1 @@
__VERSION__ = '0.0.7'
__VERSION__ = '0.0.8'

View File

@@ -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