summaryrefslogtreecommitdiffstats
path: root/md_tw.py
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2018-02-18 16:30:46 +0000
committerrsiddharth <s@ricketyspace.net>2018-02-18 16:30:46 +0000
commit446f2a2dfe7244d52483a239f402718b8ee94301 (patch)
tree296a1b5eef604f094a94f63c9dac20578919d615 /md_tw.py
parent47e6b9de8b237d8af154325e1d9dfbc463a8d4f0 (diff)
md_tw.py: Update TWMarkdown.parse.
* md_tw.py (TWMarkdown)[parse]: Update method.
Diffstat (limited to 'md_tw.py')
-rw-r--r--md_tw.py4
1 files 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():