diff options
Diffstat (limited to 'vendor/league/commonmark-ext-table/README.md')
| -rw-r--r-- | vendor/league/commonmark-ext-table/README.md | 152 |
1 files changed, 0 insertions, 152 deletions
diff --git a/vendor/league/commonmark-ext-table/README.md b/vendor/league/commonmark-ext-table/README.md deleted file mode 100644 index 4612bc3cd6..0000000000 --- a/vendor/league/commonmark-ext-table/README.md +++ /dev/null @@ -1,152 +0,0 @@ -CommonMark Table Extension -========================== - -[](https://packagist.org/packages/league/commonmark-ext-table) -[](https://travis-ci.org/thephpleague/commonmark-ext-table) -[](https://scrutinizer-ci.com/g/thephpleague/commonmark-ext-table/code-structure) -[](https://scrutinizer-ci.com/g/thephpleague/commonmark-ext-table) - -The Table extension adds the ability to create tables in CommonMark documents. - -Installation ------------- - -This project can be installed via Composer: - - composer require league/commonmark-ext-table - -Usage ------ - -Configure your `Environment` as usual and simply add the `TableExtension` provided by this package: - -```php -use League\CommonMark\Converter; -use League\CommonMark\DocParser; -use League\CommonMark\Environment; -use League\CommonMark\HtmlRenderer; -use League\CommonMark\Ext\Table\TableExtension; - -// Obtain a pre-configured Environment with all the standard CommonMark parsers/renderers ready-to-go -$environment = Environment::createCommonMarkEnvironment(); - -// Add this extension -$environment->addExtension(new TableExtension()); - -// Instantiate the converter engine and start converting some Markdown! -$converter = new Converter(new DocParser($environment), new HtmlRenderer($environment)); - -echo $converter->convertToHtml('# Hello World!'); -``` - -Syntax ------- - -This package is fully compatible with GFM-style tables: - -### Simple - -Code: -```markdown -th | th(center) | th(right) ----|:----------:|----------: -td | td | td -``` - -Result: -```html -<table> -<thead> -<tr> -<th style="text-align: left">th</th> -<th style="text-align: center">th(center)</th> -<th style="text-align: right">th(right<)/th> -</tr> -</thead> -<tbody> -<tr> -<td style="text-align: left">td</td> -<td style="text-align: center">td</td> -<td style="text-align: right">td</td> -</tr> -</tbody> -</table> -``` - -### Advanced - -```markdown -| header 1 | header 2 | header 2 | -| :------- | :------: | -------: | -| cell 1.1 | cell 1.2 | cell 1.3 | -| cell 2.1 | cell 2.2 | cell 2.3 | -``` - -### Table caption - -```markdown -header 1 | header 2 --------- | -------- -cell 1.1 | cell 1.2 -[Simple table] -``` - -Code: -```markdown -header 1 | header 2 --------- | -------- -cell 1.1 | cell 1.2 -[*Prototype* table][reference_table] -``` - -Result: -```html -<table> -<caption id="reference_table"><em>Prototype</em> table</caption> -<thead> -<tr> -<th>header 1</th> -<th>header 2</th> -</tr> -</thead> -<tbody> -<tr> -<td>cell 1.1</td> -<td>cell 1.2</td> -</tr> -</tbody> -</table> -<table> -``` - -Changelog ---------- - -Please refer to the [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. - -Development ------------ - -You need to have *php* or *docker* installed to develop the library. To list all available commands run: - -```bash -./run -``` - -Security --------- - -If you discover any security related issues, please email colinodell@gmail.com instead of using the issue tracker. - -Credits -------- - -- [Martin HasoĊ](https://github.com/hason) -- [Webuni s.r.o.](https://www.webuni.cz) -- [Colin O'Dell](https://github.com/colinodell) -- [All Contributors](../../contributors) - -License -------- - -This library is licensed under the MIT license. See the [License File](LICENSE) for more information. |
