1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00
Better Markdown Parser in PHP https://parsedown.org
Go to file
2014-09-14 00:11:18 +03:00
test Rename everything to CommonMark 2014-09-14 00:11:18 +03:00
.travis.yml Add Standard Markdown testsuite. 2014-09-05 23:12:33 +03:00
composer.json remove the extra trailing comma from composer.json 2013-07-11 00:33:44 +03:00
LICENSE.txt improve license 2013-07-24 01:38:38 +03:00
Parsedown.php Limit generated headlines to h6 2014-08-25 21:06:03 +02:00
phpunit.xml.dist Rename everything to CommonMark 2014-09-14 00:11:18 +03:00
README.md improve readme 2014-06-18 12:27:25 +03:00

Parsedown

Better Markdown parser for PHP.

Features

Installation

Include Parsedown.php or install the composer package.

Example

$Parsedown = new Parsedown();

echo $Parsedown->text('Hello _Parsedown_!'); # prints: <p>Hello <em>Parsedown</em>!</p>

More examples in the wiki.

Questions

How does Parsedown work?
Parsedown recognises that the Markdown syntax is optimised for humans so it tries to read like one. It goes through text line by line. It looks at how lines start to identify blocks. It looks for special characters to identify inline elements.

Why doesnt Parsedown use namespaces?
Using namespaces would mean dropping support for PHP 5.2. Since Parsedown is a single class with an uncommon name, making this trade wouldn't make much sense.

Who uses Parsedown?
phpDocumentor, Bolt CMS, RaspberryPi.org and more.