mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Compare commits
35 Commits
Author | SHA1 | Date | |
---|---|---|---|
9da19c1108 | |||
ffd9d3b407 | |||
e94ecf4adc | |||
4d3079b908 | |||
70e7a17380 | |||
9518c8e384 | |||
c581284231 | |||
cb1940255a | |||
93d0ec9397 | |||
9c6e7e880a | |||
2d62e29625 | |||
595f33871e | |||
97e1e0efaa | |||
648419467a | |||
6ddb6b2b33 | |||
0008e69a83 | |||
c664785485 | |||
bdf0ef024e | |||
21a3e8790a | |||
e5e8d02934 | |||
7ff0f97811 | |||
596350d1f5 | |||
2cbd3010e4 | |||
3b4aa6bff7 | |||
05a8f16e95 | |||
79d924040a | |||
b4a8eb3315 | |||
4383cce85b | |||
ada39109e4 | |||
a06cdfb814 | |||
6bee326c92 | |||
3fe867d294 | |||
f08d017bcb | |||
e61a6114b0 | |||
9ed72ccd09 |
928
Parsedown.php
928
Parsedown.php
File diff suppressed because it is too large
Load Diff
11
README.md
11
README.md
@ -10,9 +10,8 @@ Better Markdown Parser in PHP
|
|||||||
* [Consistent](http://parsedown.org/consistency)
|
* [Consistent](http://parsedown.org/consistency)
|
||||||
* [GitHub flavored](https://help.github.com/articles/github-flavored-markdown)
|
* [GitHub flavored](https://help.github.com/articles/github-flavored-markdown)
|
||||||
* [Tested](http://parsedown.org/tests/) in PHP 5.2, 5.3, 5.4, 5.5, 5.6 and [hhvm](http://www.hhvm.com/)
|
* [Tested](http://parsedown.org/tests/) in PHP 5.2, 5.3, 5.4, 5.5, 5.6 and [hhvm](http://www.hhvm.com/)
|
||||||
* Extensible
|
* [Extensible](https://github.com/erusev/parsedown/wiki/Writing-Extensions)
|
||||||
* [Markdown Extra extension](https://github.com/erusev/parsedown-extra)
|
* [Markdown Extra extension](https://github.com/erusev/parsedown-extra)
|
||||||
* [JavaScript port](https://github.com/hkdobrev/parsedown.js) under development
|
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
@ -36,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.
|
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).
|
[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?**
|
**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,21 +1,21 @@
|
|||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th align="left">header 1</th>
|
<th style="text-align: left;">header 1</th>
|
||||||
<th align="center">header 2</th>
|
<th style="text-align: center;">header 2</th>
|
||||||
<th align="right">header 2</th>
|
<th style="text-align: right;">header 2</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left">cell 1.1</td>
|
<td style="text-align: left;">cell 1.1</td>
|
||||||
<td align="center">cell 1.2</td>
|
<td style="text-align: center;">cell 1.2</td>
|
||||||
<td align="right">cell 1.3</td>
|
<td style="text-align: right;">cell 1.3</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left">cell 2.1</td>
|
<td style="text-align: left;">cell 2.1</td>
|
||||||
<td align="center">cell 2.2</td>
|
<td style="text-align: center;">cell 2.2</td>
|
||||||
<td align="right">cell 2.3</td>
|
<td style="text-align: right;">cell 2.3</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
@ -1,13 +1,12 @@
|
|||||||
<div>_content_</div>
|
<div>_content_</div>
|
||||||
<p>sparse:</p>
|
<p>paragraph</p>
|
||||||
<div>
|
<div>
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
_content_
|
_content_
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p>paragraph</p>
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
p {
|
p {color: #789;}
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
<div>
|
||||||
|
<a href="/">home</a></div>
|
@ -1,6 +1,6 @@
|
|||||||
<div>_content_</div>
|
<div>_content_</div>
|
||||||
|
|
||||||
sparse:
|
paragraph
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
@ -8,10 +8,9 @@ _content_
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
paragraph
|
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
p {
|
p {color: #789;}
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<a href="/">home</a></div>
|
@ -1,4 +1,6 @@
|
|||||||
<p><a href="http://example.com">link</a> and <a href="/tests/">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"><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" /></a></p>
|
||||||
<p><a href="http://example.com"><img src="http://parsedown.org/md.png" alt="MD Logo" /> and text</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](/tests/)
|
[link](http://example.com)
|
||||||
|
|
||||||
|
[link](/url-(parentheses)) with parentheses in URL
|
||||||
|
|
||||||
|
([link](/index.php)) in parentheses
|
||||||
|
|
||||||
[`link`](http://example.com)
|
[`link`](http://example.com)
|
||||||
|
|
||||||
|
@ -1 +1,4 @@
|
|||||||
<p><a href="http://example.com" title="Title">single quotes</a> and <a href="http://example.com" title="Title">double quotes</a></p>
|
<p><a href="http://example.com" title="Title">single quotes</a></p>
|
||||||
|
<p><a href="http://example.com" title="Title">double quotes</a></p>
|
||||||
|
<p><a href="http://example.com" title="2 Words">space</a></p>
|
||||||
|
<p><a href="http://example.com/url-(parentheses)" title="Title">parentheses</a></p>
|
@ -1 +1,7 @@
|
|||||||
[single quotes](http://example.com 'Title') and [double quotes](http://example.com "Title")
|
[single quotes](http://example.com 'Title')
|
||||||
|
|
||||||
|
[double quotes](http://example.com "Title")
|
||||||
|
|
||||||
|
[space](http://example.com "2 Words")
|
||||||
|
|
||||||
|
[parentheses](http://example.com/url-(parentheses) "Title")
|
@ -20,17 +20,17 @@
|
|||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th align="left">header 1</th>
|
<th style="text-align: left;">header 1</th>
|
||||||
<th>header 2</th>
|
<th>header 2</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left">cell 1.1</td>
|
<td style="text-align: left;">cell 1.1</td>
|
||||||
<td>cell 1.2</td>
|
<td>cell 1.2</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left">cell 2.1</td>
|
<td style="text-align: left;">cell 2.1</td>
|
||||||
<td>cell 2.2</td>
|
<td>cell 2.2</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -11,8 +11,12 @@
|
|||||||
<td><del>cell</del> 1.2</td>
|
<td><del>cell</del> 1.2</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>cell</code> 2.1</td>
|
<td><code>|</code> 2.1</td>
|
||||||
<td>cell 2.2</td>
|
<td>| 2.2</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>\|</code> 2.1</td>
|
||||||
|
<td><a href="/">link</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
@ -1,4 +1,5 @@
|
|||||||
| _header_ 1 | header 2 |
|
| _header_ 1 | header 2 |
|
||||||
| ------------ | ------------ |
|
| ------------ | ------------ |
|
||||||
| _cell_ 1.1 | ~~cell~~ 1.2 |
|
| _cell_ 1.1 | ~~cell~~ 1.2 |
|
||||||
| `cell` 2.1 | cell 2.2 |
|
| `|` 2.1 | \| 2.2 |
|
||||||
|
| `\|` 2.1 | [link](/) |
|
Reference in New Issue
Block a user