diff options
author | Waylan Limberg <waylan@gmail.com> | 2013-02-08 06:50:25 -0500 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2013-02-08 06:50:25 -0500 |
commit | a0df080088bef0fac603b83752a36c5c403016e6 (patch) | |
tree | 04ad4b2fb13032c677e472515fad8f34dffe50e4 /markdown/__init__.py | |
parent | 25e187598f06f04feeacbf967b7651e93286d3f4 (diff) | |
download | markdown-a0df080088bef0fac603b83752a36c5c403016e6.tar.gz markdown-a0df080088bef0fac603b83752a36c5c403016e6.tar.bz2 markdown-a0df080088bef0fac603b83752a36c5c403016e6.zip |
Cleaned up fixes for #183
My previous commit (d5a94c2) broke a few things badly. Unfortunately I failed
to run the complete test suite and didn't catch it. A bad regex was crashing
the test suite. Also cleaned up a few other odds and ends from previous work
on #183. Still loosing a few random empty lines in code blocks though.
I suspect this may also fix #188.
Diffstat (limited to 'markdown/__init__.py')
-rw-r--r-- | markdown/__init__.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/markdown/__init__.py b/markdown/__init__.py index be45a8b..fbd2879 100644 --- a/markdown/__init__.py +++ b/markdown/__init__.py @@ -284,6 +284,7 @@ class Markdown: source = source.replace(util.STX, "").replace(util.ETX, "") source = source.replace("\r\n", "\n").replace("\r", "\n") + "\n\n" source = source.expandtabs(self.tab_length) + source = re.sub(r'\n +\n', '\n\n', source) # Split into lines and run the line preprocessors. self.lines = source.split("\n") |