PHPackages                             league/commonmark-extras - 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. league/commonmark-extras

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

league/commonmark-extras
========================

Useful extensions for customizing the league/commonmark Markdown parser

1.2.0(6y ago)3082.4k↑11.1%45BSD-3-ClausePHPPHP ^7.1

Since Jan 14Pushed 6y ago4 watchersCompare

[ Source](https://github.com/thephpleague/commonmark-extras)[ Packagist](https://packagist.org/packages/league/commonmark-extras)[ Docs](https://github.com/thephpleague/commonmark-extras)[ GitHub Sponsors](https://github.com/colinodell)[ Patreon](https://www.patreon.com/colinodell)[ RSS](/packages/league-commonmark-extras/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (18)Used By (5)

league/commonmark-extras
========================

[](#leaguecommonmark-extras)

[![Latest Version on Packagist](https://camo.githubusercontent.com/aedb3914e56474db2c7d85ffa6228120a67a4951b78799c716e635e1885af17f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c65616775652f636f6d6d6f6e6d61726b2d6578747261732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/league/commonmark-extras)[![Software License](https://camo.githubusercontent.com/f4927c28d46f9aff0a32ba934d27da23943c7e31876f86d6362e41a56e9c66ad/687474703a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4253442d2d332d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/2a355b1c1432d4caef762cc05027d00dc8d2b81feb970ec4bfb1c1d6c4757dd5/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7468657068706c65616775652f636f6d6d6f6e6d61726b2d6578747261732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/thephpleague/commonmark-extras)[![Coverage Status](https://camo.githubusercontent.com/d7780a32abe08d5331f53340ba6ee951334682bbb6e9e94be79667ab2ca043a3/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f7468657068706c65616775652f636f6d6d6f6e6d61726b2d6578747261732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/thephpleague/commonmark-extras/code-structure)[![Quality Score](https://camo.githubusercontent.com/197bd258dc238a8fd22ca6b04c32503c25fa176ecb6dd4ddc765be4fd9f5e55e/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7468657068706c65616775652f636f6d6d6f6e6d61726b2d6578747261732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/thephpleague/commonmark-extras)[![Total Downloads](https://camo.githubusercontent.com/765c2dc5521737e4c997de8e883737b767c69e2147443e939446576c67cb01ce/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c65616775652f636f6d6d6f6e6d61726b2d6578747261732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/league/commonmark-extras)

DEPRECATED
----------

[](#deprecated)

**This extension has been deprecated**. All of its functionality now exists in [`league/commonmark`](https://github.com/thephpleague/commonmark) 1.3+. You can either register the various extensions individually or use the `GithubFlavoredMarkdownExtension` to get full GFM functionality, so you should upgrade to that version of `league/commonmark` and use that instead of this one.

Overview
--------

[](#overview)

**league/commonmark-extras** is a collection of useful GFM extensions and utilities for the [league/commonmark](https://github.com/thephpleague/commonmark) project.

Adding this extension to your project will automatically register these sub-extensions:

**Extension****Purpose**[league/commonmark-ext-autolink](https://github.com/thephpleague/commonmark-ext-autolink)Automatically creating links to URLs and email address (without needing the `` syntax)[league/commonmark-ext-smartpunct](https://github.com/thephpleague/commonmark-ext-smartpunct)Intelligently converts ASCII quotes, dashes, and ellipses to their Unicode equivalents[league/commonmark-ext-strikethrough](https://github.com/thephpleague/commonmark-ext-strikethrough)Adds support for `~~strikethrough~~` syntax[league/commonmark-ext-table](https://github.com/thephpleague/commonmark-ext-table)GFM-style tables[league/commonmark-ext-task-list](https://github.com/thephpleague/commonmark-ext-task-list)GFM-style task lists `- [x] Like this`Install
-------

[](#install)

Via Composer

```
$ composer require league/commonmark-extras
```

Usage
-----

[](#usage)

This can be added to any new `Environment`:

```
use League\CommonMark\CommonMarkConverter;
use League\CommonMark\Environment;
use League\CommonMark\Extras\CommonMarkExtrasExtension;

// Obtain a pre-configured Environment with all the CommonMark parsers/renderers ready-to-go
$environment = Environment::createCommonMarkEnvironment();

// REGISTER THIS EXTENSION HERE
$environment->addExtension(new CommonMarkExtrasExtension());

// Define your configuration:
$config = [];

// Now that the `Environment` is configured we can create the converter engine:
$converter = new CommonMarkConverter($config, $environment);

// Go forth and convert you some Markdown!
echo $converter->convertToHtml('# Hello World!');
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [Colin O'Dell](https://github.com/colinodell)
- [All Contributors](../../contributors)

License
-------

[](#license)

This library is licensed under the BSD-3 license. See the [LICENSE file](LICENSE) for more information.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 85.5% 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 ~103 days

Recently: every ~78 days

Total

16

Last Release

2233d ago

Major Versions

0.5.0 → 1.0.0-beta12019-05-27

PHP version history (3 changes)0.1.0PHP &gt;=5.4.8

0.2.0PHP &gt;=5.6

0.3.0PHP ^7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/4325b62a6ad366c731c3120595d861469be50f9da88df3ea99752c30ff98c179?d=identicon)[colinodell](/maintainers/colinodell)

---

Top Contributors

[![colinodell](https://avatars.githubusercontent.com/u/202034?v=4)](https://github.com/colinodell "colinodell (53 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (6 commits)")[![bcremer](https://avatars.githubusercontent.com/u/55820?v=4)](https://github.com/bcremer "bcremer (1 commits)")[![glensc](https://avatars.githubusercontent.com/u/199095?v=4)](https://github.com/glensc "glensc (1 commits)")[![redbeardcreator](https://avatars.githubusercontent.com/u/375927?v=4)](https://github.com/redbeardcreator "redbeardcreator (1 commits)")

---

Tags

commonmarkcommonmark-extensiongfmmarkdownmarkdown-extraphpmarkdownextensionsgfmcommonmarkExtras

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/league-commonmark-extras/health.svg)

```
[![Health](https://phpackages.com/badges/league-commonmark-extras/health.svg)](https://phpackages.com/packages/league-commonmark-extras)
```

###  Alternatives

[league/commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)

2.9k404.0M702](/packages/league-commonmark)[torchlight/torchlight-commonmark

A Commonmark extension for Torchlight, the syntax highlighting API.

29256.6k6](/packages/torchlight-torchlight-commonmark)[maglnet/magl-markdown

Provides a ZF2 View Helper to render markdown syntax. It uses third-party libraries for the rendering and you can switch between different renderers.

22178.2k4](/packages/maglnet-magl-markdown)[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)
