PHPackages                             webuni/commonmark-table-extension - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. webuni/commonmark-table-extension

Abandoned → [league/commonmark](/?search=league%2Fcommonmark)ArchivedCommonmark-extension[Parsing &amp; Serialization](/categories/parsing)

webuni/commonmark-table-extension
=================================

Table extension for league/commonmark

v2.1.0(6y ago)127950.3k↓38.8%1411MITPHPPHP ^7.1

Since Jun 24Pushed 6y ago7 watchersCompare

[ Source](https://github.com/webuni/commonmark-table-extension)[ Packagist](https://packagist.org/packages/webuni/commonmark-table-extension)[ Docs](https://github.com/thephpleague/commonmark-ext-table)[ RSS](/packages/webuni-commonmark-table-extension/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (18)Used By (11)

CommonMark Table Extension
==========================

[](#commonmark-table-extension)

[![Latest Version](https://camo.githubusercontent.com/406fb25972a3a32fa2ec3aba8c227f7d4cfa9a063f204d609ed6dd6a625b1b16/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c65616775652f636f6d6d6f6e6d61726b2d6578742d7461626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/league/commonmark-ext-table)[![Build Status](https://camo.githubusercontent.com/b758760a3591b18588e789e3536f07815dbd863da6f1a3ab2a540b423f035e21/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7468657068706c65616775652f636f6d6d6f6e6d61726b2d6578742d7461626c652e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/thephpleague/commonmark-ext-table)[![Code Quality](https://camo.githubusercontent.com/9bb696789d54e690574a6f7c1660933340d71ae1a91c4f0d236f71074bf24685/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7468657068706c65616775652f636f6d6d6f6e6d61726b2d6578742d7461626c652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/thephpleague/commonmark-ext-table/code-structure)[![Code Coverage](https://camo.githubusercontent.com/95f726f0ad09b42eede032db5797475be8eeb795c3e0ba58d63c6c6952b35126/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f7468657068706c65616775652f636f6d6d6f6e6d61726b2d6578742d7461626c652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/thephpleague/commonmark-ext-table)

DEPRECATED
----------

[](#deprecated)

**This extension has been deprecated**. All of its functionality now exists in [`league/commonmark`](https://github.com/thephpleague/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.

Overview
--------

[](#overview)

The Table extension adds the ability to create tables in CommonMark documents.

Installation
------------

[](#installation)

This project can be installed via Composer:

```
composer require league/commonmark-ext-table

```

Usage
-----

[](#usage)

Configure your `Environment` as usual and simply add the `TableExtension` provided by this package:

```
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
------

[](#syntax)

This package is fully compatible with GFM-style tables:

### Simple

[](#simple)

Code:

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

Result:

```

th
th(center)
th(right

td
td
td

```

### Advanced

[](#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

[](#table-caption)

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

Code:

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

Result:

```

Prototype table

header 1
header 2

cell 1.1
cell 1.2

```

Changelog
---------

[](#changelog)

Please refer to the [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Development
-----------

[](#development)

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

```
./run
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#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
-------

[](#license)

This library is licensed under the MIT license. See the [License File](LICENSE) for more information.

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity51

Moderate usage in the ecosystem

Community31

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 51.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~97 days

Recently: every ~152 days

Total

17

Last Release

2426d ago

Major Versions

0.9.0 → 1.0.02019-07-09

1.0.0 → v2.0.02019-07-13

PHP version history (4 changes)0.1.0PHP &gt;=5.4

0.5.0PHP ^5.5|^7.0

0.7.0PHP ^5.6|^7.0

1.0.0PHP ^7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/306adbad9084ed5c22aa85cbfce4899263466d76dff211b5c4c9f54dc23c40a1?d=identicon)[hason](/maintainers/hason)

---

Top Contributors

[![hason](https://avatars.githubusercontent.com/u/288535?v=4)](https://github.com/hason "hason (48 commits)")[![colinodell](https://avatars.githubusercontent.com/u/202034?v=4)](https://github.com/colinodell "colinodell (29 commits)")[![michalbundyra](https://avatars.githubusercontent.com/u/7423207?v=4)](https://github.com/michalbundyra "michalbundyra (3 commits)")[![nanaya](https://avatars.githubusercontent.com/u/276295?v=4)](https://github.com/nanaya "nanaya (3 commits)")[![baijunyao](https://avatars.githubusercontent.com/u/9360694?v=4)](https://github.com/baijunyao "baijunyao (2 commits)")[![onigoetz](https://avatars.githubusercontent.com/u/309594?v=4)](https://github.com/onigoetz "onigoetz (2 commits)")[![yenyasinn](https://avatars.githubusercontent.com/u/1183951?v=4)](https://github.com/yenyasinn "yenyasinn (1 commits)")[![rcole5](https://avatars.githubusercontent.com/u/11550424?v=4)](https://github.com/rcole5 "rcole5 (1 commits)")[![rejinka](https://avatars.githubusercontent.com/u/831348?v=4)](https://github.com/rejinka "rejinka (1 commits)")[![shulard](https://avatars.githubusercontent.com/u/482993?v=4)](https://github.com/shulard "shulard (1 commits)")[![smoogipoo](https://avatars.githubusercontent.com/u/1329837?v=4)](https://github.com/smoogipoo "smoogipoo (1 commits)")[![glensc](https://avatars.githubusercontent.com/u/199095?v=4)](https://github.com/glensc "glensc (1 commits)")

---

Tags

commonmarktablemarkdowncommonmarkextensiontable

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/webuni-commonmark-table-extension/health.svg)

```
[![Health](https://phpackages.com/badges/webuni-commonmark-table-extension/health.svg)](https://phpackages.com/packages/webuni-commonmark-table-extension)
```

###  Alternatives

[zoon/commonmark-ext-youtube-iframe

Extension for league/commonmark to replace youtube link with iframe

12275.9k1](/packages/zoon-commonmark-ext-youtube-iframe)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
