An extension of ParsedownExtra and Parsedown that adds support for rowspan and colspan.
Also, ParsedownExtended 1.1+ provides in the same way.
Install the composer package by running the following command:
composer require kennysoft/parsedown-tablespan
- Download the "Source code" from the latest release
- Include
Parsedown.php
,ParsedownExtra.php
, andParsedownTablespan.php
$ParsedownTablespan = new ParsedownTablespan();
echo $ParsedownTablespan->text('
| > | > | Colspan | > | for thead |
| ----- | :---------: | -----------: | ----------- | --------- |
| Lorem | ipsum | dolor | sit | amet |
| ^ | - | > | right align | . |
| , | > | center align | > | 2x2 cell |
| > | another 2x2 | + | > | ^ |
| > | ^ | | | ! |
');
Prints:
Colspan | for thead | |||
---|---|---|---|---|
Lorem | ipsum | dolor | sit | amet |
- | right align | . | ||
, | center align | 2x2 cell | ||
another 2x2 | + | |||
! |
(Since GitHub does not accept style attribute for cells, upper table is made with align
attribute which is not supported in HTML5, just to show what will be generated.)
KENNYSOFT hyeonmin.park@kennysoft.kr