Name: commonmark-extras
Owner: The League of Extraordinary Packages
Description: Useful extensions for the league/commonmark parser
Created: 2016-01-13 18:07:59.0
Updated: 2018-05-03 12:45:53.0
Pushed: 2018-01-19 02:17:18.0
Homepage: null
Size: 24
Language: PHP
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
league/commonmark-extras is a collection of useful extensions and utilities for the league/commonmark project.
Via Composer
mposer require league/commonmark-extras
Extensions can be added to any new Environment
:
League\CommonMark\CommonMarkConverter;
League\CommonMark\Environment;
League\CommonMark\Extras\SmartPunct\SmartPunctExtension;
btain a pre-configured Environment with all the CommonMark parsers/renderers ready-to-go
ironment = Environment::createCommonMarkEnvironment();
DD YOUR OWN EXTENSIONS HERE. For example:
ironment->addExtension(new SmartPunctExtension());
efine your configuration:
fig = [];
ow that the `Environment` is configured we can create the converter engine:
verter = new CommonMarkConverter($config, $environment);
o forth and convert you some Markdown!
$converter->convertToHtml('# Hello World!');
Please see CHANGELOG for more information what has changed recently.
mposer test
New features and extensions are welcome! Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email colinodell@gmail.com instead of using the issue tracker.
This library is licensed under the BSD-3 license. See the License File for more information.