1
0
mirror of https://github.com/erusev/parsedown.git synced 2025-09-02 19:32:35 +02:00

Merge pull request #612 from aidantwoods/fix/table-columns

Table header should not be allowed to contain new lines
This commit is contained in:
Aidan Woods
2018-04-09 16:53:07 +01:00
committed by GitHub
3 changed files with 17 additions and 2 deletions

View File

@@ -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;
}

View File

@@ -66,4 +66,10 @@
<td>cell 2.1</td>
</tr>
</tbody>
</table>
</table>
<hr />
<p>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</p>

View File

@@ -22,4 +22,12 @@ cell 2.1
header 1
-------|
cell 1.1
cell 2.1
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