aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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>