From cad2e7b18e510a89e159148f1141691fd1fc6715 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Tue, 2 Jan 2018 00:44:15 +0000 Subject: md_tw.py: Add TWBlockLexer.parse_hrule. * md_tw.py (TWBlockLexer.parse_hrule): New method * tests/test_md_tw.py (TestTWBlockLexer.test_parse_hrule): New test. * tests/data/blexer-hrules.md: New file. --- tests/test_md_tw.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/test_md_tw.py') diff --git a/tests/test_md_tw.py b/tests/test_md_tw.py index a71c191..da7981c 100644 --- a/tests/test_md_tw.py +++ b/tests/test_md_tw.py @@ -90,6 +90,19 @@ class TestTWBlockLexer(object): self._validate(tokens, 'heading', expected_lhs) + def test_parse_hrule(self): + tokens = self._parse('blexer-hrules.md') + + expected_hrs = [ + '* * *\n\n', + '***\n\n', + '*****\n\n', + '- - -\n\n', + '---------------------------------------\n\n' + ] + + self._validate(tokens, 'hrule', expected_hrs) + def teardown(self): pass -- cgit v1.2.3