aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2008-11-13 01:17:46 -0500
committerWaylan Limberg <waylan@gmail.com>2008-11-13 23:27:44 -0500
commit2bf55d59937e91262677ef617e108d9178865454 (patch)
tree0b44d2c12fff761c7b8acdcbe5d5d373ce90844a
parent7198bb18b7f842502aec48245b2bc7d86a02fb3a (diff)
downloadmarkdown-2bf55d59937e91262677ef617e108d9178865454.tar.gz
markdown-2bf55d59937e91262677ef617e108d9178865454.tar.bz2
markdown-2bf55d59937e91262677ef617e108d9178865454.zip
Fixed whitespace only line clearing and updated another test to match pl and php output of lists. Only one test failing from core parser refactor now.
-rwxr-xr-xmarkdown.py2
-rw-r--r--tests/misc/some-test.html18
2 files changed, 8 insertions, 12 deletions
diff --git a/markdown.py b/markdown.py
index 9c93fa4..3ae26e3 100755
--- a/markdown.py
+++ b/markdown.py
@@ -1787,7 +1787,7 @@ class Markdown:
source = source.replace(STX, "").replace(ETX, "")
source = source.replace("\r\n", "\n").replace("\r", "\n") + "\n\n"
- source = re.sub(r'\n\s\n', '\n\n', source)
+ source = re.sub(r'\n\s+\n', '\n\n', source)
source = source.expandtabs(TAB_LENGTH)
# Split into lines and run the line preprocessors.
diff --git a/tests/misc/some-test.html b/tests/misc/some-test.html
index 9f26092..a36d1ee 100644
--- a/tests/misc/some-test.html
+++ b/tests/misc/some-test.html
@@ -19,21 +19,19 @@
<hr />
<ul>
<li>as if
-non_code</li>
+ non_code</li>
<li>as if2</li>
</ul>
<p>Markdown</p>
<ul>
-<li>
-<p>Python
-is ok</p>
-<ul>
+<li>Python
+ is ok<ul>
<li>Therefore i am</li>
</ul>
</li>
<li>
<p>Perl sucks
-big time</p>
+ big time</p>
<ul>
<li>But that's
ok</li>
@@ -42,15 +40,13 @@ ok</li>
<li>
<p>Python is
ok
-Or not?</p>
+ Or not?</p>
</li>
</ul>
<p>Here is a normal paragraph</p>
<ol>
-<li>
-<p>Another list
-with a bunch of items</p>
-</li>
+<li>Another list
+with a bunch of items</li>
<li>
<p>Mostly fruits</p>
<ol>