mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
9da19c1108 | |||
ffd9d3b407 | |||
e94ecf4adc | |||
4d3079b908 | |||
70e7a17380 | |||
9518c8e384 | |||
c581284231 | |||
cb1940255a | |||
93d0ec9397 | |||
9c6e7e880a | |||
2d62e29625 | |||
595f33871e | |||
97e1e0efaa | |||
648419467a |
@ -17,7 +17,7 @@ class Parsedown
|
||||
{
|
||||
# ~
|
||||
|
||||
const version = '1.5.0';
|
||||
const version = '1.5.1';
|
||||
|
||||
# ~
|
||||
|
||||
@ -736,8 +736,6 @@ class Parsedown
|
||||
{
|
||||
$Block['closed'] = true;
|
||||
}
|
||||
|
||||
$Block['markup'] .= $matches[1];
|
||||
}
|
||||
|
||||
if (isset($Block['interrupted']))
|
||||
@ -1199,7 +1197,7 @@ class Parsedown
|
||||
return;
|
||||
}
|
||||
|
||||
if (preg_match('/^[(]((?:[^ (]|[(][^ )]+[)])+)(?:[ ]+("[^"]+"|\'[^\']+\'))?[)]/', $remainder, $matches))
|
||||
if (preg_match('/^[(]((?:[^ ()]|[(][^ )]+[)])+)(?:[ ]+("[^"]+"|\'[^\']+\'))?[)]/', $remainder, $matches))
|
||||
{
|
||||
$Element['attributes']['href'] = $matches[1];
|
||||
|
||||
@ -1360,11 +1358,6 @@ class Parsedown
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# ~
|
||||
|
||||
protected $unmarkedInlineTypes = array("\n" => 'Break', '://' => 'Url');
|
||||
|
||||
# ~
|
||||
|
||||
protected function unmarkedText($text)
|
||||
|
@ -35,14 +35,14 @@ It tries to read Markdown like a human. First, it looks at the lines. It’s int
|
||||
|
||||
We call this approach "line based". We believe that Parsedown is the first Markdown parser to use it. Since the release of Parsedown, other developers have used the same approach to develop other Markdown parsers in PHP and in other languages.
|
||||
|
||||
**Is Parsedown compliant with CommonMark?**
|
||||
**Is it compliant with CommonMark?**
|
||||
|
||||
The majority of the CommonMark tests pass. Most of the tests that don't pass deal with cases that are quite extreme. Yet, we are working on them. As CommonMark matures, compliance should improve.
|
||||
It passes most of the CommonMark tests. Most of the tests that don't pass deal with cases that are quite uncommon. Still, as CommonMark matures, compliance should improve.
|
||||
|
||||
**Who uses Parsedown?**
|
||||
**Who uses it?**
|
||||
|
||||
[phpDocumentor](http://www.phpdoc.org/), [October CMS](http://octobercms.com/), [Bolt CMS](http://bolt.cm/), [Kirby CMS](http://getkirby.com/), [Grav CMS](http://getgrav.org/), [Statamic CMS](http://www.statamic.com/), [RaspberryPi.org](http://www.raspberrypi.org/) and [more](https://www.versioneye.com/php/erusev:parsedown/references).
|
||||
|
||||
**How can I help?**
|
||||
|
||||
Use the project, tell friends about it and if you feel generous, [donate some money](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=528P3NZQMP8N2).
|
||||
Use it, star it, share it and if you feel generous, [donate some money](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=528P3NZQMP8N2).
|
||||
|
@ -1,13 +1,12 @@
|
||||
<div>_content_</div>
|
||||
<p>sparse:</p>
|
||||
<div>
|
||||
<div class="inner">
|
||||
_content_
|
||||
</div>
|
||||
</div>
|
||||
<p>paragraph</p>
|
||||
<div>
|
||||
<div class="inner">
|
||||
_content_
|
||||
</div>
|
||||
</div>
|
||||
<style type="text/css">
|
||||
p {
|
||||
color: red;
|
||||
}
|
||||
</style>
|
||||
p {color: #789;}
|
||||
</style>
|
||||
<div>
|
||||
<a href="/">home</a></div>
|
@ -1,17 +1,16 @@
|
||||
<div>_content_</div>
|
||||
|
||||
sparse:
|
||||
|
||||
<div>
|
||||
<div class="inner">
|
||||
_content_
|
||||
</div>
|
||||
</div>
|
||||
|
||||
paragraph
|
||||
|
||||
<div>
|
||||
<div class="inner">
|
||||
_content_
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style type="text/css">
|
||||
p {
|
||||
color: red;
|
||||
}
|
||||
p {color: #789;}
|
||||
</style>
|
||||
|
||||
<div>
|
||||
<a href="/">home</a></div>
|
@ -1,4 +1,6 @@
|
||||
<p><a href="http://example.com">link</a> and <a href="/url-with-(parentheses)">another link</a></p>
|
||||
<p><a href="http://example.com">link</a></p>
|
||||
<p><a href="/url-(parentheses)">link</a> with parentheses in URL </p>
|
||||
<p>(<a href="/index.php">link</a>) in parentheses</p>
|
||||
<p><a href="http://example.com"><code>link</code></a></p>
|
||||
<p><a href="http://example.com"><img src="http://parsedown.org/md.png" alt="MD Logo" /></a></p>
|
||||
<p><a href="http://example.com"><img src="http://parsedown.org/md.png" alt="MD Logo" /> and text</a></p>
|
@ -1,4 +1,8 @@
|
||||
[link](http://example.com) and [another link](/url-with-(parentheses))
|
||||
[link](http://example.com)
|
||||
|
||||
[link](/url-(parentheses)) with parentheses in URL
|
||||
|
||||
([link](/index.php)) in parentheses
|
||||
|
||||
[`link`](http://example.com)
|
||||
|
||||
|
Reference in New Issue
Block a user