mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03: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:
commit
8091e5586a
@ -883,6 +883,7 @@ class Parsedown
|
|||||||
strpos($Block['element']['handler']['argument'], '|') === false
|
strpos($Block['element']['handler']['argument'], '|') === false
|
||||||
and strpos($Line['text'], '|') === false
|
and strpos($Line['text'], '|') === false
|
||||||
and strpos($Line['text'], ':') === false
|
and strpos($Line['text'], ':') === false
|
||||||
|
or strpos($Block['element']['handler']['argument'], "\n") !== false
|
||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -67,3 +67,9 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</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>
|
@ -23,3 +23,11 @@ header 1
|
|||||||
-------|
|
-------|
|
||||||
cell 1.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
|
Loading…
Reference in New Issue
Block a user