markdown-textwrap

text wrap markdown documents
git clone git://git.ricketyspace.net/markdown-textwrap.git
Log | Files | Refs

commit 446f2a2dfe7244d52483a239f402718b8ee94301
parent 47e6b9de8b237d8af154325e1d9dfbc463a8d4f0
Author: rsiddharth <s@ricketyspace.net>
Date:   Sun, 18 Feb 2018 16:30:46 +0000

md_tw.py: Update TWMarkdown.parse.

* md_tw.py (TWMarkdown)[parse]: Update method.

Diffstat:
md_tw.py | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/md_tw.py b/md_tw.py @@ -272,8 +272,8 @@ class TWMarkdown(mistune.Markdown): def parse(self, text): out = super(TWMarkdown, self).parse(text) - # Strip newline at the beginning. - return out.lstrip('\n') + # Add newline at the end. + return '{}\n'.format(out.strip('\n')) def main():