aboutsummaryrefslogtreecommitdiffstats
path: root/markdown/__init__.py
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2013-02-07 10:34:50 -0500
committerWaylan Limberg <waylan@gmail.com>2013-02-07 10:34:50 -0500
commit0a65037e120e0e14659991379648a1a4345b6981 (patch)
treeef3966bbb2312d5799400236cc328897c23b069b /markdown/__init__.py
parentd5a94c21313915ebbd50c061bf19e68ef6dee115 (diff)
downloadmarkdown-0a65037e120e0e14659991379648a1a4345b6981.tar.gz
markdown-0a65037e120e0e14659991379648a1a4345b6981.tar.bz2
markdown-0a65037e120e0e14659991379648a1a4345b6981.zip
Preserve whitespace in empty lines
Partial fix for #183. By preserving tabs at the start of empty lines in code blocks, the parser will retain those empty lines. Still does not work consistantly if the tab is missing!? Not sure why. Also added tests.
Diffstat (limited to 'markdown/__init__.py')
-rw-r--r--markdown/__init__.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/markdown/__init__.py b/markdown/__init__.py
index fbd2879..be45a8b 100644
--- a/markdown/__init__.py
+++ b/markdown/__init__.py
@@ -284,7 +284,6 @@ 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")