improve readme

This commit is contained in:
Emanuil Rusev 2014-05-16 01:15:21 +03:00
parent b384839d15
commit 21db821324
1 changed files with 14 additions and 4 deletions

View File

@ -2,8 +2,7 @@
Better [Markdown](http://en.wikipedia.org/wiki/Markdown) parser for PHP.
- [Demo](http://parsedown.org/demo)
- [Tests](http://parsedown.org/tests/)
* [Demo](http://parsedown.org/demo)
### Features
@ -21,7 +20,18 @@ Include `Parsedown.php` or install [the composer package](https://packagist.org/
### Example
``` 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).