aboutsummaryrefslogtreecommitdiffstats
path: root/markdown.py
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2007-10-08 01:57:40 +0000
committerWaylan Limberg <waylan@gmail.com>2007-10-08 01:57:40 +0000
commit83ae589dfbf7e8331642fe0d6951655825eff56d (patch)
tree609d3d2538653b57710c749eef0b3e14c75e1e98 /markdown.py
parenta75df2c7bf2325449fdecc613290f126b7141ccb (diff)
downloadmarkdown-83ae589dfbf7e8331642fe0d6951655825eff56d.tar.gz
markdown-83ae589dfbf7e8331642fe0d6951655825eff56d.tar.bz2
markdown-83ae589dfbf7e8331642fe0d6951655825eff56d.zip
fixed whitespace handling to match 1.6b - a codeblock on the first line now works.
Diffstat (limited to 'markdown.py')
-rw-r--r--markdown.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/markdown.py b/markdown.py
index e1e7dae..cb90171 100644
--- a/markdown.py
+++ b/markdown.py
@@ -1180,7 +1180,7 @@ class Markdown:
self.doc.appendChild(self.top_element)
# Fixup the source text
- text = self.source.strip()
+ text = self.source
text = text.replace("\r\n", "\n").replace("\r", "\n")
text += "\n\n"
text = text.expandtabs(TAB_LENGTH)
@@ -1658,7 +1658,7 @@ class Markdown:
for pp in self.textPostprocessors :
xml = pp.run(xml)
- return self.docType + xml
+ return (self.docType + xml).strip()
__str__ = convert # deprecated - will be changed in 1.7 to report