diff options
author | Dmitry Shachnev <mitya57@gmail.com> | 2016-03-03 17:22:47 +0300 |
---|---|---|
committer | Dmitry Shachnev <mitya57@gmail.com> | 2016-03-03 17:22:47 +0300 |
commit | 08d81b0e1e38b7662d4a8837c1b6a229b7082482 (patch) | |
tree | 7a3ee5a4104ea2ca5744d692400778d73e9501fc /tests/test_extensions.py | |
parent | 06958b18b3497c8514514f65543223ef2879bf6c (diff) | |
download | markdown-08d81b0e1e38b7662d4a8837c1b6a229b7082482.tar.gz markdown-08d81b0e1e38b7662d4a8837c1b6a229b7082482.tar.bz2 markdown-08d81b0e1e38b7662d4a8837c1b6a229b7082482.zip |
Make TestCodeHilite work with Pygments ≥ 2.1.1
New versions of Pygments insert <span></span> blocks in the beginning
of the generated output sometimes [1], so we need to remove those blocks
before doing the actual checking.
[1]: https://bitbucket.org/birkenfeld/pygments-main/commits/164574c13533
Diffstat (limited to 'tests/test_extensions.py')
-rw-r--r-- | tests/test_extensions.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_extensions.py b/tests/test_extensions.py index 30b21bb..6d47e0e 100644 --- a/tests/test_extensions.py +++ b/tests/test_extensions.py @@ -209,7 +209,7 @@ class TestCodeHilite(TestCaseWithAssertStartsWith): if self.has_pygments: self.assertStartsWith( '<div class="codehilite"><pre><span class="hll"', - md.convert(text) + md.convert(text).replace('<span></span>', '') ) else: self.assertEqual( @@ -330,7 +330,7 @@ line 3 if self.has_pygments: self.assertStartsWith( '<div class="codehilite"><pre><span class="hll"', - md.convert(text) + md.convert(text).replace('<span></span>', '') ) else: self.assertEqual( @@ -365,7 +365,7 @@ line 3 if self.has_pygments: self.assertStartsWith( '<div class="codehilite"><pre><span class="hll"', - md.convert(text) + md.convert(text).replace('<span></span>', '') ) else: self.assertEqual( |