diff --git a/Parsedown.php b/Parsedown.php index 9e02e16..5baf6ab 100644 --- a/Parsedown.php +++ b/Parsedown.php @@ -883,6 +883,7 @@ class Parsedown strpos($Block['element']['handler']['argument'], '|') === false and strpos($Line['text'], '|') === false and strpos($Line['text'], ':') === false + or strpos($Block['element']['handler']['argument'], "\n") !== false ) { return; } diff --git a/test/data/simple_table.html b/test/data/simple_table.html index f6f7aab..b74a2ec 100644 --- a/test/data/simple_table.html +++ b/test/data/simple_table.html @@ -66,4 +66,10 @@ cell 2.1 - \ No newline at end of file + +
+

Not a table, we haven't ended the paragraph: +header 1 | header 2 +-------- | -------- +cell 1.1 | cell 1.2 +cell 2.1 | cell 2.2

\ No newline at end of file diff --git a/test/data/simple_table.md b/test/data/simple_table.md index f767257..42eff5a 100644 --- a/test/data/simple_table.md +++ b/test/data/simple_table.md @@ -22,4 +22,12 @@ cell 2.1 header 1 -------| cell 1.1 -cell 2.1 \ No newline at end of file +cell 2.1 + +--- + +Not a table, we haven't ended the paragraph: +header 1 | header 2 +-------- | -------- +cell 1.1 | cell 1.2 +cell 2.1 | cell 2.2 \ No newline at end of file