taeluf / liaison.common-mark
Liaison addon to integrate CommonMark
v0.3.x-dev
2022-01-17 23:02 UTC
Requires
- league/commonmark: ^2.0
- taeluf/liaison: v0.5.x-dev
Requires (Dev)
- taeluf/code-scrawl: v0.6.x-dev
- taeluf/tester: v0.3.x-dev
This package is auto-updated.
Last update: 2024-10-11 01:54:19 UTC
README
CommonMark Addon
Integrates CommonMark with Liaison.
This library is not affiliated with CommonMark.
With Liaison, simply do:
$cmark = new \Lia\Addon\CommonMark($liaison);
# If you want any CommonMark extensions
$cmark->enable_extension('table_of_contents', $configs[]);
# for custom setup on the environment
$cmark->add_hook('environment', function($environment){$environment->addRenderer(...); });
For a list of extensions, see code/CommonMark.php $extension_list
& $default_configs
properties.
Note: For extensions, you may need to add dependencies to your composer.json. CommonMark comes with quite a few built-in though.
Install
composer require taeluf/liaison.common-mark v0.3.x-dev
or in your composer.json
{"require":{ "taeluf/liaison.common-mark": "v0.3.x-dev"}}