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

Compare commits

..

5 Commits
0.7.2 ... 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
7bb70186c1 simplify test for em strong 2013-11-23 13:35:15 +02:00
4 changed files with 28 additions and 18 deletions

View File

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

View File

@ -1,8 +1,20 @@
## Parsedown ## 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 ### Installation
@ -19,3 +31,4 @@ echo $result; # prints: <p>Hello <strong>Parsedown</strong>!</p>
``` ```
[1]: http://daringfireball.net/projects/markdown/ [1]: http://daringfireball.net/projects/markdown/
[2]: https://help.github.com/articles/github-flavored-markdown

View File

@ -1,5 +1,4 @@
<p><strong><em>em strong</em></strong></p> <p><strong><em>em strong</em> strong</strong></p>
<p><strong><em>one</em> at the start</strong></p> <p><strong>strong <em>em strong</em></strong></p>
<p><strong>one at the <em>end</em></strong></p> <p><strong>strong <em>em strong</em> strong</strong></p>
<p><strong>one <em>in the</em> middle</strong></p> <p><strong>strong <em>em strong</em></strong></p>
<p><strong>one with <em>asterisks</em></strong></p>

View File

@ -1,9 +1,7 @@
___em strong___ ___em strong_ strong__
___one_ at the start__ __strong _em strong___
__one at the _end___ __strong _em strong_ strong__
__one _in the_ middle__ **strong *em strong***
**one with *asterisks***