1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

improve readme

This commit is contained in:
Emanuil Rusev 2014-05-16 01:15:21 +03:00
parent b384839d15
commit 21db821324

View File

@ -2,8 +2,7 @@
Better [Markdown](http://en.wikipedia.org/wiki/Markdown) parser for PHP. Better [Markdown](http://en.wikipedia.org/wiki/Markdown) parser for PHP.
- [Demo](http://parsedown.org/demo) * [Demo](http://parsedown.org/demo)
- [Tests](http://parsedown.org/tests/)
### Features ### Features
@ -21,7 +20,18 @@ Include `Parsedown.php` or install [the composer package](https://packagist.org/
### Example ### Example
``` php ``` php
$Parsedown = new Parsedown(); $parsedown = new Parsedown();
echo $Parsedown->text('Hello _Parsedown_!'); # prints: <p>Hello <em>Parsedown</em>!</p> echo $parsedown->text('Hello _Parsedown_!'); # prints: <p>Hello <em>Parsedown</em>!</p>
``` ```
### 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](http://www.phpdoc.org/), [Bolt CMS](http://bolt.cm/), [RaspberryPi.org](http://www.raspberrypi.org/) and [more](https://www.versioneye.com/php/erusev:parsedown/references).