2017 © Pedro PelĂĄez
 

library commonmark-table-extension

The table extension for CommonMark PHP implementation

image

webuni/commonmark-table-extension

The table extension for CommonMark PHP implementation

  • Wednesday, January 24, 2018
  • by hason
  • Repository
  • 3 Watchers
  • 37 Stars
  • 554,080 Installations
  • PHP
  • 24 Dependents
  • 0 Suggesters
  • 9 Forks
  • 0 Open issues
  • 14 Versions
  • 6 % Grown

The README.md

CommonMark Table Extension

Latest Version Build Status Code Quality Code Coverage, (*1)

DEPRECATED

This extension has been deprecated. All of its functionality now exists in league/commonmark 1.3+ under the League\CommonMark\Extension\Table namespace, so you should upgrade to that version and use that bundled extension instead of this one., (*2)

Overview

The Table extension adds the ability to create tables in CommonMark documents., (*3)

Installation

This project can be installed via Composer:, (*4)

composer require league/commonmark-ext-table

Usage

Configure your Environment as usual and simply add the TableExtension provided by this package:, (*5)

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:, (*6)

Simple

Code:, (*7)

th | th(center) | th(right)
---|:----------:|----------:
td | td         | td

Result:, (*8)

<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

| 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

header 1 | header 2
-------- | --------
cell 1.1 | cell 1.2
[Simple table]

Code:, (*9)

header 1 | header 2
-------- | --------
cell 1.1 | cell 1.2
[*Prototype* table][reference_table]

Result:, (*10)

<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 for more information on what has changed recently., (*11)

Development

You need to have php or docker installed to develop the library. To list all available commands run:, (*12)

./run

Security

If you discover any security related issues, please email colinodell@gmail.com instead of using the issue tracker., (*13)

Credits

License

This library is licensed under the MIT license. See the License File for more information., (*14)

The Versions

24/01 2018

dev-master

9999999-dev https://github.com/webuni/commonmark-table-extension

The table extension for CommonMark PHP implementation

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Hasoƈ

table markdown commonmark

24/01 2018

0.8.0

0.8.0.0 https://github.com/webuni/commonmark-table-extension

The table extension for CommonMark PHP implementation

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Hasoƈ

table markdown commonmark

23/01 2018

0.7.1

0.7.1.0 https://github.com/webuni/commonmark-table-extension

The table extension for CommonMark PHP implementation

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Hasoƈ

table markdown commonmark

09/01 2018

0.7.0

0.7.0.0 https://github.com/webuni/commonmark-table-extension

The table extension for CommonMark PHP implementation

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Hasoƈ

table markdown commonmark

11/01 2017

0.6.1

0.6.1.0 https://github.com/webuni/commonmark-table-extension

The table extension for CommonMark PHP implementation

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Hasoƈ

table markdown commonmark

26/09 2016

0.6.0

0.6.0.0 https://github.com/webuni/commonmark-table-extension

The table extension for CommonMark PHP implementation

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Hasoƈ

table markdown commonmark

14/01 2016

0.4.3

0.4.3.0 https://github.com/webuni/commonmark-table-extension

The table extension for CommonMark PHP implementation

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Hasoƈ

table markdown commonmark

05/11 2015

0.4.2

0.4.2.0 https://github.com/webuni/commonmark-table-extension

The table extension for CommonMark PHP implementation

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Hasoƈ

table markdown commonmark

22/09 2015

0.4.1

0.4.1.0 https://github.com/webuni/commonmark-table-extension

The table extension for CommonMark PHP implementation

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Hasoƈ

table markdown commonmark

21/09 2015

0.4.0

0.4.0.0 https://github.com/webuni/commonmark-table-extension

The table extension for CommonMark PHP implementation

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Hasoƈ

table markdown commonmark

27/07 2015

0.3.0

0.3.0.0 https://github.com/webuni/commonmark-table-extension

The table extension for CommonMark PHP implementation

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Hasoƈ

table markdown commonmark

27/07 2015

0.2.0

0.2.0.0 https://github.com/webuni/commonmark-table-extension

The table extension for CommonMark PHP implementation

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Hasoƈ

table markdown commonmark

24/06 2015

0.1.0

0.1.0.0 https://github.com/webuni/commonmark-table-extension

The table extension for CommonMark PHP implementation

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Hasoƈ

table markdown commonmark