diff options
author | rsiddharth <s@ricketyspace.net> | 2018-01-02 00:44:15 +0000 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2018-01-02 00:44:15 +0000 |
commit | cad2e7b18e510a89e159148f1141691fd1fc6715 (patch) | |
tree | b0775d38b5f476105b7167826a432a93b33f4164 /md_tw.py | |
parent | d78ac3764a90fc959862777f37fc9f175e5272e1 (diff) |
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.
Diffstat (limited to 'md_tw.py')
-rw-r--r-- | md_tw.py | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -67,6 +67,12 @@ class TWBlockLexer(mistune.BlockLexer): 'text': m.group(0), }) + def parse_hrule(self, m): + self.tokens.append({ + 'type': 'hrule', + 'text': m.group(0) + }) + class TWInlineLexer(mistune.InlineLexer): """Text Wrap Inline level lexer for inline gramars.""" |