From 5b01915a639377a53c00b7b05343a1e0e568f66d Mon Sep 17 00:00:00 2001 From: Emanuil Rusev Date: Fri, 6 Dec 2013 00:14:50 +0200 Subject: [PATCH] interrupted list items should not add nonexistent empty lines --- Parsedown.php | 2 ++ tests/data/multiline_list_paragraph.html | 7 +++++++ tests/data/multiline_list_paragraph.md | 4 ++++ 3 files changed, 13 insertions(+) create mode 100644 tests/data/multiline_list_paragraph.html create mode 100644 tests/data/multiline_list_paragraph.md diff --git a/Parsedown.php b/Parsedown.php index 396e970..6c4cf7e 100755 --- a/Parsedown.php +++ b/Parsedown.php @@ -221,6 +221,8 @@ class Parsedown $element['lines'] []= $line; + unset($element['interrupted']); + continue 2; } } diff --git a/tests/data/multiline_list_paragraph.html b/tests/data/multiline_list_paragraph.html new file mode 100644 index 0000000..3247bd2 --- /dev/null +++ b/tests/data/multiline_list_paragraph.html @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/tests/data/multiline_list_paragraph.md b/tests/data/multiline_list_paragraph.md new file mode 100644 index 0000000..f5b4272 --- /dev/null +++ b/tests/data/multiline_list_paragraph.md @@ -0,0 +1,4 @@ +- li + + line + line \ No newline at end of file