summaryrefslogtreecommitdiffstats
path: root/md_tw.py
diff options
context:
space:
mode:
Diffstat (limited to 'md_tw.py')
-rw-r--r--md_tw.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/md_tw.py b/md_tw.py
index 64c9ced..10bd0a8 100644
--- a/md_tw.py
+++ b/md_tw.py
@@ -59,6 +59,14 @@ class TWBlockLexer(mistune.BlockLexer):
'text': m.group(0),
})
+ def parse_lheading(self, m):
+ """Parse setext heading."""
+ self.tokens.append({
+ 'type': 'heading',
+ 'level': 1 if m.group(2) == '=' else 2,
+ 'text': m.group(0),
+ })
+
class TWInlineLexer(mistune.InlineLexer):
"""Text Wrap Inline level lexer for inline gramars."""