cradeq / commonmark-br-extension
Allows HTML break tags to be used in Markdown, while still escaping or stripping all other HTML input.
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:commonmark-extension
Requires
- php: ^8.3
- league/commonmark: ^2.5
Requires (Dev)
- phpunit/phpunit: ^11.4
README
This package allows HTML break tags (<br>
, <br/>
, <br />
) to be used in Markdown, while still escaping or stripping all other HTML input.
Install
This project can be installed via composer:
composer require cradeq/commonmark-br-extension
Usage
use Cradeq\CommonMark\BreakTagExtension; use League\CommonMark\Environment\Environment; use League\CommonMark\Extension\CommonMark\CommonMarkCoreExtension; $environment = new Environment(); $environment->addExtension(new CommonMarkCoreExtension); $environment->addExtension(new BreakTagExtension);