diff options
author | rsiddharth <s@ricketyspace.net> | 2018-04-01 06:36:09 +0000 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2018-04-01 06:42:43 +0000 |
commit | 472fbff768ad431f3ca030bf899180252394f18d (patch) | |
tree | 5d5541e6e6169851d1878345200ecde15b738621 /md_tw.py | |
parent | 74a49b17ab90af2fe57a1d10f12550cdca0fad4a (diff) |
md_tw.py: Add TWMarkdown.output_heading.
Add prefix, if it exists, to heading.
* md_tw.py (TWMarkdown.output_heading): Override super class's method.
* tests/data/renderer-heading-w.md: Update file.
* tests/data/renderer-heading.md: Update file.
Diffstat (limited to 'md_tw.py')
-rw-r--r-- | md_tw.py | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -356,6 +356,14 @@ class TWMarkdown(mistune.Markdown): if subseq: self.renderer.tw_set(subsequent_indent=p) + def output_heading(self): + rendered_heading = '{}{}'.format( + self.renderer.tw_get('initial_indent'), + super(TWMarkdown, self).output_heading() + ) + + return rendered_heading + def output_block_quote(self): # Add prefix self._add_prefix('> ') |