Skip to content

An extension of ParsedownExtra and Parsedown that adds support for rowspan and colspan.

License

Notifications You must be signed in to change notification settings

KENNYSOFT/parsedown-tablespan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Parsedown Tablespan

An extension of ParsedownExtra and Parsedown that adds support for rowspan and colspan.

Also, ParsedownExtended 1.1+ provides in the same way.

Installation

Composer

Install the composer package by running the following command:

composer require kennysoft/parsedown-tablespan

Manual

  1. Download the "Source code" from the latest release
  2. Include Parsedown.php, ParsedownExtra.php, and ParsedownTablespan.php

Example

$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.)

License

Author

KENNYSOFT [email protected]

About

An extension of ParsedownExtra and Parsedown that adds support for rowspan and colspan.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages