youthweb / bbcode-parser
BBCode-to-HTML parser
Installs: 6 824
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 6
Forks: 1
Open Issues: 1
Requires
- php: ^7.4 || ^8.0
- cache/void-adapter: ^1.1
- jakeasmith/http_build_url: ^1
- jbbcode/jbbcode: ^1.4
- youthweb/urllinker: ^1.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.3
- phpstan/phpstan: ^1.2
- phpunit/phpunit: ^9
README
A BBCode-to-HTML parser for youthweb.net
Install
Via Composer
$ composer require youthweb/bbcode-parser
Usage
use Youthweb\BBCodeParser\Manager; $text = '[h1]Hello World![/h1] This is a [i]simple[/i] test to demonstrate the [b]BBCodeParser[/b].'; $parser = new Manager(); $config = ['parse_headlines' => true]; echo $parser->parse($text, $config); // "<h1>Hello World!</h1> // <p>This is a <i>simple</i> test to demonstrate the <b>BBCodeParser</b>.</p>"
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
$ vendor/bin/phpunit
Contributing
Please feel free to submit bugs or to fork and sending Pull Requests.
License
GPL3. Please see License File for more information.