PHPackages                             league/commonmark-ext-task-list - 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-ext-task-list

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

league/commonmark-ext-task-list
===============================

Extension for league/commonmark which supports GFM-style task lists

v1.1.0(6y ago)423.6k—0%1BSD-3-ClausePHPPHP ^7.1

Since May 13Pushed 6y ago4 watchersCompare

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

READMEChangelog (5)Dependencies (2)Versions (7)Used By (0)

GFM-style task list extension for `league/commonmark`
=====================================================

[](#gfm-style-task-list-extension-for-leaguecommonmark)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9f9da39cfb92d9ec02d453e4a4f44bc7ca58a7dd3cc97a5e44ced34698f1f2ac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c65616775652f636f6d6d6f6e6d61726b2d6578742d7461736b2d6c6973742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/league/commonmark-ext-task-list)[![Software License](https://camo.githubusercontent.com/f4927c28d46f9aff0a32ba934d27da23943c7e31876f86d6362e41a56e9c66ad/687474703a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4253442d2d332d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/0535ecdf359cb002bdaaa8d1e3a85074c10ea878cf2e1e9fff1a2419014f27b7/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7468657068706c65616775652f636f6d6d6f6e6d61726b2d6578742d7461736b2d6c6973742f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/thephpleague/commonmark-ext-task-list)[![Coverage Status](https://camo.githubusercontent.com/b0b10e6faf458db67de5fff0ff8a9f047253e6fc70855a3c225a058f564cb191/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f7468657068706c65616775652f636f6d6d6f6e6d61726b2d6578742d7461736b2d6c6973742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/thephpleague/commonmark-ext-task-list/code-structure)[![Quality Score](https://camo.githubusercontent.com/af813b2a31becd54b2a6654883d0e305ddb52544d2a8613a6ac96b1778b2d4c9/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7468657068706c65616775652f636f6d6d6f6e6d61726b2d6578742d7461736b2d6c6973742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/thephpleague/commonmark-ext-task-list)[![Total Downloads](https://camo.githubusercontent.com/23c1407913d10e013495813859876cfb79ce8416afa22de7641bf09877d06b51/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c65616775652f636f6d6d6f6e6d61726b2d6578742d7461736b2d6c6973742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/league/commonmark-ext-task-list)

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\TaskList` namespace, so you should upgrade to that version and use that bundled extension instead of this one.

Overview
--------

[](#overview)

This extension adds [GFM-style task list items](https://github.github.com/gfm/#task-list-items-extension-) to the [`league/commonmark` Markdown parser for PHP](https://github.com/thephpleague/commonmark).

Install
-------

[](#install)

Via Composer

```
$ composer require league/commonmark-ext-task-list
```

Usage
-----

[](#usage)

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

```
use League\CommonMark\CommonMarkConverter;
use League\CommonMark\Environment;
use League\CommonMark\Ext\TaskList\TaskListExtension;

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

// Add this extension
$environment->addExtension(new TaskListExtension());

// Instantiate the converter engine and start converting some Markdown!
$converter = new CommonMarkConverter([], $environment);

$markdown =
