diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/misc/em_strong_complex.html | 2 | ||||
-rw-r--r-- | tests/misc/em_strong_complex.txt | 2 | ||||
-rw-r--r-- | tests/misc/underscores.html | 2 | ||||
-rw-r--r-- | tests/options/no-smart-emphasis.html | 1 | ||||
-rw-r--r-- | tests/options/no-smart-emphasis.txt | 1 | ||||
-rw-r--r-- | tests/test_legacy.py | 2 | ||||
-rw-r--r-- | tests/test_syntax/extensions/test_legacy_em.py | 40 |
7 files changed, 43 insertions, 7 deletions
diff --git a/tests/misc/em_strong_complex.html b/tests/misc/em_strong_complex.html index 3befa70..65faddf 100644 --- a/tests/misc/em_strong_complex.html +++ b/tests/misc/em_strong_complex.html @@ -1,7 +1,7 @@ <p><em><strong>test test</strong> test test</em></p> <p><strong><em>test test</em> test test</strong></p> <p><strong><em>test</em></strong></p> -<p><strong>test</strong>_</p> +<p><strong>test</strong></p> <p><strong><em>test</em> test</strong>_</p> <p><strong><em>test</em> test</strong></p> <p><em>test_test test_test</em></p> diff --git a/tests/misc/em_strong_complex.txt b/tests/misc/em_strong_complex.txt index 66f4ff1..0425971 100644 --- a/tests/misc/em_strong_complex.txt +++ b/tests/misc/em_strong_complex.txt @@ -4,7 +4,7 @@ ___test test_ test test__ ___test___ -__test___ +__test__ ___test_ test___ diff --git a/tests/misc/underscores.html b/tests/misc/underscores.html index 54bd9f9..72d51b8 100644 --- a/tests/misc/underscores.html +++ b/tests/misc/underscores.html @@ -1,6 +1,6 @@ <p>THIS_SHOULD_STAY_AS_IS</p> <p>Here is some <em>emphasis</em>, ok?</p> <p>Ok, at least <em>this</em> should work.</p> -<p>THIS<strong>SHOULD</strong>STAY</p> +<p>THIS__SHOULD__STAY</p> <p>Here is some <strong>strong</strong> stuff.</p> <p>THIS<strong><em>SHOULD</em></strong>STAY?</p>
\ No newline at end of file diff --git a/tests/options/no-smart-emphasis.html b/tests/options/no-smart-emphasis.html deleted file mode 100644 index c4f1381..0000000 --- a/tests/options/no-smart-emphasis.html +++ /dev/null @@ -1 +0,0 @@ -<p><em>connected</em>words_</p>
\ No newline at end of file diff --git a/tests/options/no-smart-emphasis.txt b/tests/options/no-smart-emphasis.txt deleted file mode 100644 index cf500b5..0000000 --- a/tests/options/no-smart-emphasis.txt +++ /dev/null @@ -1 +0,0 @@ -_connected_words_
\ No newline at end of file diff --git a/tests/test_legacy.py b/tests/test_legacy.py index 976a84e..0d0dd09 100644 --- a/tests/test_legacy.py +++ b/tests/test_legacy.py @@ -46,8 +46,6 @@ class TestOptions(LegacyTestCase): html4 = Kwargs(output_format='html4') - no_smart_emphasis = Kwargs(smart_emphasis=False) - class TestPhp(LegacyTestCase): """ diff --git a/tests/test_syntax/extensions/test_legacy_em.py b/tests/test_syntax/extensions/test_legacy_em.py new file mode 100644 index 0000000..ddb2079 --- /dev/null +++ b/tests/test_syntax/extensions/test_legacy_em.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +""" +Python Markdown + +A Python implementation of John Gruber's Markdown. + +Documentation: https://python-markdown.github.io/ +GitHub: https://github.com/Python-Markdown/markdown/ +PyPI: https://pypi.org/project/Markdown/ + +Started by Manfred Stienstra (http://www.dwerg.net/). +Maintained for a few years by Yuri Takhteyev (http://www.freewisdom.org). +Currently maintained by Waylan Limberg (https://github.com/waylan), +Dmitry Shachnev (https://github.com/mitya57) and Isaac Muse (https://github.com/facelessuser). + +Copyright 2007-2018 The Python Markdown Project (v. 1.7 and later) +Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b) +Copyright 2004 Manfred Stienstra (the original version) + +License: BSD (see LICENSE.md for details). +""" + +from __future__ import unicode_literals +from markdown.test_tools import TestCase + + +class TestLegacyEm(TestCase): + def test_legacy_emphasis(self): + self.assertMarkdownRenders( + '_connected_words_', + '<p><em>connected</em>words_</p>', + extensions=['legacy_em'] + ) + + def test_legacy_strong(self): + self.assertMarkdownRenders( + '__connected__words__', + '<p><strong>connected</strong>words__</p>', + extensions=['legacy_em'] + ) |