summaryrefslogtreecommitdiffstats
path: root/tests/test_md_tw.py
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2018-01-02 00:41:45 +0000
committerrsiddharth <s@ricketyspace.net>2018-01-02 00:41:45 +0000
commitd78ac3764a90fc959862777f37fc9f175e5272e1 (patch)
tree9000027d64860dd1ede7ace083c29900b92eeebb /tests/test_md_tw.py
parent06fd732f8d1b4b1d6ef7313df8f441009c781cd7 (diff)
md_tw.py: Add TWBlockLexer.parse_lheading.
* md_tw.py (TWBlockLexer.parse_lheading): New method. * tests/test_md_tw.py (TestTWBlockLexer.test_parse_lheading): New method. * tests/data/blexer-lheading.md: New file.
Diffstat (limited to 'tests/test_md_tw.py')
-rw-r--r--tests/test_md_tw.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_md_tw.py b/tests/test_md_tw.py
index af2ce45..a71c191 100644
--- a/tests/test_md_tw.py
+++ b/tests/test_md_tw.py
@@ -79,6 +79,17 @@ class TestTWBlockLexer(object):
self._validate(tokens, 'heading', expected_hs)
+ def test_parse_lheading(self):
+ tokens = self._parse('blexer-lheading.md')
+
+ expected_lhs = [
+ 'Milky Chance\n============\n\n',
+ 'Flashed\n-------\n\n',
+ '### Junk Mind\n\n',
+ ]
+
+ self._validate(tokens, 'heading', expected_lhs)
+
def teardown(self):
pass