From 446f2a2dfe7244d52483a239f402718b8ee94301 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Sun, 18 Feb 2018 16:30:46 +0000 Subject: md_tw.py: Update TWMarkdown.parse. * md_tw.py (TWMarkdown)[parse]: Update method. --- md_tw.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/md_tw.py b/md_tw.py index 52e1e98..8d92e89 100644 --- 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(): -- cgit v1.2.3