taeluf/liaison.common-mark

Liaison addon to integrate CommonMark

v0.3.x-dev 2022-01-17 23:02 UTC

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"}}