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

Compare commits

..

4 Commits
0.7.3 ... 0.7.4

Author SHA1 Message Date
8baf537c12 resolve #40 2013-12-02 23:26:43 +02:00
05823567bc simplify comments 2013-12-02 23:02:15 +02:00
b7029ab176 improve readme 2013-12-01 00:10:30 +02:00
102a947c7a improve readme 2013-11-23 15:58:58 +02:00
2 changed files with 20 additions and 7 deletions

View File

@ -110,7 +110,6 @@ class Parsedown
foreach ($lines as $line)
{
#
# fenced elements
switch ($element['type'])
@ -168,7 +167,6 @@ class Parsedown
continue;
}
#
# composite elements
switch ($element['type'])
@ -238,7 +236,6 @@ class Parsedown
break;
}
#
# indentation sensitive types
$deindented_line = $line;
@ -336,7 +333,6 @@ class Parsedown
break;
}
#
# indentation insensitive types
switch ($deindented_line[0])
@ -572,7 +568,11 @@ class Parsedown
strpos($text, "\x1A\\") !== FALSE and $text = strtr($text, $this->escape_sequence_map);
$markup .= '<pre><code>'.$text.'</code></pre>'."\n";
$markup .= isset($element['language'])
? '<pre><code class="language-'.$element['language'].'">'.$text.'</code></pre>'
: '<pre><code>'.$text.'</code></pre>';
$markup .= "\n";
break;

View File

@ -1,8 +1,20 @@
## Parsedown
Fast and consistent [Markdown][1] parser for PHP.
Better [Markdown][1] parser for PHP.
[Home](http://parsedown.org) &middot; [Demo](http://parsedown.org/explorer/) &middot; [Tests](http://parsedown.org/tests/)
***
[home](http://parsedown.org/) &middot; [demo](http://parsedown.org/demo) &middot; [tests](http://parsedown.org/tests/)
***
Features:
* [fast](http://parsedown.org/speed)
* [consistent](http://parsedown.org/consistency)
* [ GitHub Flavored ][2]
* tested in PHP 5.2, 5.3, 5.4 and 5.5
* friendly to international input
### Installation
@ -19,3 +31,4 @@ echo $result; # prints: <p>Hello <strong>Parsedown</strong>!</p>
```
[1]: http://daringfireball.net/projects/markdown/
[2]: https://help.github.com/articles/github-flavored-markdown