2013-11-16 11:51:01 +04:00
|
|
|
## Parsedown
|
2013-07-24 00:32:45 +04:00
|
|
|
|
2013-12-15 05:32:34 +04:00
|
|
|
Better [Markdown](http://en.wikipedia.org/wiki/Markdown) parser for PHP.
|
2013-07-11 00:22:16 +04:00
|
|
|
|
2013-11-23 17:58:58 +04:00
|
|
|
***
|
|
|
|
|
2013-12-15 05:32:34 +04:00
|
|
|
[ [demo](http://parsedown.org/demo) ] [ [tests](http://parsedown.org/tests/) ]
|
2013-11-23 17:58:58 +04:00
|
|
|
|
|
|
|
***
|
|
|
|
|
2013-12-04 00:49:50 +04:00
|
|
|
### Features
|
2013-11-23 17:58:58 +04:00
|
|
|
|
2013-12-01 02:10:30 +04:00
|
|
|
* [fast](http://parsedown.org/speed)
|
|
|
|
* [consistent](http://parsedown.org/consistency)
|
2013-12-04 01:19:50 +04:00
|
|
|
* [GitHub Flavored](https://help.github.com/articles/github-flavored-markdown)
|
2013-11-23 17:58:58 +04:00
|
|
|
* friendly to international input
|
2014-01-17 03:33:20 +04:00
|
|
|
* [tested](https://travis-ci.org/erusev/parsedown) in PHP 5.2, 5.3, 5.4, 5.5 and [hhvm](http://www.hhvm.com/)
|
2013-07-23 11:36:28 +04:00
|
|
|
|
2013-07-24 00:32:45 +04:00
|
|
|
### Installation
|
|
|
|
|
|
|
|
Include `Parsedown.php` or install [the composer package](https://packagist.org/packages/erusev/parsedown).
|
|
|
|
|
2013-07-24 00:54:32 +04:00
|
|
|
### Example
|
2013-07-24 00:32:45 +04:00
|
|
|
|
|
|
|
```php
|
2014-01-17 03:33:20 +04:00
|
|
|
$text = 'Hello _Parsedown_!';
|
2013-07-24 00:32:45 +04:00
|
|
|
|
|
|
|
$result = Parsedown::instance()->parse($text);
|
|
|
|
|
2014-01-17 03:33:20 +04:00
|
|
|
echo $result; # prints: <p>Hello <em>Parsedown</em>!</p>
|
2013-11-13 03:38:29 +04:00
|
|
|
```
|