mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Compare commits
33 Commits
1.0.0-rc.1
...
1.0.0-rc.5
Author | SHA1 | Date | |
---|---|---|---|
2bd2f81f4f | |||
e318e66de5 | |||
0820d0a607 | |||
b8d1cfe91a | |||
d85a233611 | |||
973d4a866d | |||
d19c2b6942 | |||
4dde57451d | |||
44686c4f1e | |||
db02ecf259 | |||
aa004d4595 | |||
1bb65457ed | |||
0c9a4af8ab | |||
cc94c1b584 | |||
e8d8801db4 | |||
521803cdcd | |||
0eb480324c | |||
7c78aff578 | |||
2a5f99547c | |||
e373391e7d | |||
9fa415bcc5 | |||
37416b5f07 | |||
83d3e3dbbf | |||
307a987cb6 | |||
eab3cbf255 | |||
cf7f32f891 | |||
4150e00dc4 | |||
22affa124b | |||
5e95242318 | |||
504991a04e | |||
3d84201d74 | |||
4f027386b1 | |||
cd1c030362 |
@ -7,3 +7,4 @@ php:
|
|||||||
- 5.3
|
- 5.3
|
||||||
- 5.2
|
- 5.2
|
||||||
- hhvm
|
- hhvm
|
||||||
|
|
832
Parsedown.php
832
Parsedown.php
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<phpunit colors="true">
|
<phpunit bootstrap="test/bootstrap.php" colors="true">
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite>
|
<testsuite>
|
||||||
<file>tests/Test.php</file>
|
<file>test/Test.php</file>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
</phpunit>
|
</phpunit>
|
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
include 'Parsedown.php';
|
|
||||||
|
|
||||||
class Test extends PHPUnit_Framework_TestCase
|
class Test extends PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
public function __construct($name = null, array $data = array(), $dataName = '')
|
public function __construct($name = null, array $data = array(), $dataName = '')
|
3
test/bootstrap.php
Normal file
3
test/bootstrap.php
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
include 'Parsedown.php';
|
@ -1,8 +1,8 @@
|
|||||||
<h1>h1</h1>
|
<h1>h1</h1>
|
||||||
<h2>h2</h2>
|
<h2>h2</h2>
|
||||||
<h3>h3</h3>
|
<h3>h3</h3>
|
||||||
<h4>h4</h4>
|
<h4>h4</h4>
|
||||||
<h5>h5</h5>
|
<h5>h5</h5>
|
||||||
<h6>h6</h6>
|
<h6>h6</h6>
|
||||||
<h1>closed h1</h1>
|
<h1>closed h1</h1>
|
||||||
<p>#</p>
|
<p>#</p>
|
@ -1,15 +1,15 @@
|
|||||||
# h1
|
# h1
|
||||||
|
|
||||||
## h2
|
## h2
|
||||||
|
|
||||||
### h3
|
### h3
|
||||||
|
|
||||||
#### h4
|
#### h4
|
||||||
|
|
||||||
##### h5
|
##### h5
|
||||||
|
|
||||||
###### h6
|
###### h6
|
||||||
|
|
||||||
# closed h1 #
|
# closed h1 #
|
||||||
|
|
||||||
#
|
#
|
@ -1,8 +1,8 @@
|
|||||||
<pre><code><?php
|
<pre><code><?php
|
||||||
|
|
||||||
$message = 'Hello World!';
|
$message = 'Hello World!';
|
||||||
echo $message;</code></pre>
|
echo $message;</code></pre>
|
||||||
<hr />
|
<hr />
|
||||||
<pre><code>> not a quote
|
<pre><code>> not a quote
|
||||||
- not a list item
|
- not a list item
|
||||||
[not a reference]: http://foo.com</code></pre>
|
[not a reference]: http://foo.com</code></pre>
|
@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$message = 'Hello World!';
|
$message = 'Hello World!';
|
||||||
echo $message;
|
echo $message;
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
> not a quote
|
> not a quote
|
||||||
- not a list item
|
- not a list item
|
||||||
[not a reference]: http://foo.com
|
[not a reference]: http://foo.com
|
@ -1,6 +1,6 @@
|
|||||||
- li
|
- li
|
||||||
- li
|
|
||||||
- li
|
- li
|
||||||
|
- li
|
||||||
|
- li
|
||||||
- li
|
- li
|
||||||
- li
|
|
||||||
- li
|
- li
|
@ -1,8 +1,8 @@
|
|||||||
<p><em>underscore</em>, <em>asterisk</em>, <em>one two</em>, <em>three four</em>, <em>a</em>, <em>b</em></p>
|
<p><em>underscore</em>, <em>asterisk</em>, <em>one two</em>, <em>three four</em>, <em>a</em>, <em>b</em></p>
|
||||||
<p><strong>strong</strong> and <em>em</em> and <strong>strong</strong> and <em>em</em></p>
|
<p><strong>strong</strong> and <em>em</em> and <strong>strong</strong> and <em>em</em></p>
|
||||||
<p><em>line
|
<p><em>line
|
||||||
line
|
line
|
||||||
line</em></p>
|
line</em></p>
|
||||||
<p>this_is_not_an_emphasis</p>
|
<p>this_is_not_an_emphasis</p>
|
||||||
<p>an empty emphasis __ ** is not an emphasis</p>
|
<p>an empty emphasis __ ** is not an emphasis</p>
|
||||||
<p>*mixed *<em>double and</em> single asterisk** spans</p>
|
<p>*mixed *<em>double and</em> single asterisk** spans</p>
|
@ -1,13 +1,13 @@
|
|||||||
_underscore_, *asterisk*, _one two_, *three four*, _a_, *b*
|
_underscore_, *asterisk*, _one two_, *three four*, _a_, *b*
|
||||||
|
|
||||||
**strong** and *em* and **strong** and *em*
|
**strong** and *em* and **strong** and *em*
|
||||||
|
|
||||||
_line
|
_line
|
||||||
line
|
line
|
||||||
line_
|
line_
|
||||||
|
|
||||||
this_is_not_an_emphasis
|
this_is_not_an_emphasis
|
||||||
|
|
||||||
an empty emphasis __ ** is not an emphasis
|
an empty emphasis __ ** is not an emphasis
|
||||||
|
|
||||||
*mixed **double and* single asterisk** spans
|
*mixed **double and* single asterisk** spans
|
@ -1,5 +1,5 @@
|
|||||||
<hr />
|
<hr />
|
||||||
<hr />
|
<hr />
|
||||||
<hr />
|
<hr />
|
||||||
<hr />
|
<hr />
|
||||||
<hr />
|
<hr />
|
@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- - -
|
- - -
|
||||||
|
|
||||||
- - -
|
- - -
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
___
|
___
|
@ -1,3 +1,4 @@
|
|||||||
<p>an <a href="http://example.com">implicit</a> reference link</p>
|
<p>an <a href="http://example.com">implicit</a> reference link</p>
|
||||||
<p>an <a href="http://example.com">implicit</a> reference link with an empty link definition</p>
|
<p>an <a href="http://example.com">implicit</a> reference link with an empty link definition</p>
|
||||||
|
<p>an <a href="http://example.com">implicit</a> reference link followed by <a href="http://cnn.com">another</a></p>
|
||||||
<p>an <a href="http://example.com" title="Example">explicit</a> reference link with a title</p>
|
<p>an <a href="http://example.com" title="Example">explicit</a> reference link with a title</p>
|
@ -4,6 +4,10 @@ an [implicit] reference link
|
|||||||
|
|
||||||
an [implicit][] reference link with an empty link definition
|
an [implicit][] reference link with an empty link definition
|
||||||
|
|
||||||
|
an [implicit][] reference link followed by [another][]
|
||||||
|
|
||||||
|
[another]: http://cnn.com
|
||||||
|
|
||||||
an [explicit][example] reference link with a title
|
an [explicit][example] reference link with a title
|
||||||
|
|
||||||
[example]: http://example.com "Example"
|
[example]: http://example.com "Example"
|
@ -1,4 +1,6 @@
|
|||||||
<blockquote>
|
<blockquote>
|
||||||
<p>quote
|
<p>quote
|
||||||
the rest of it</p>
|
the rest of it</p>
|
||||||
|
<p>another paragraph
|
||||||
|
the rest of it</p>
|
||||||
</blockquote>
|
</blockquote>
|
5
test/data/lazy_blockquote.md
Normal file
5
test/data/lazy_blockquote.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
> quote
|
||||||
|
the rest of it
|
||||||
|
|
||||||
|
> another paragraph
|
||||||
|
the rest of it
|
@ -1,2 +1,2 @@
|
|||||||
<p>line<br />
|
<p>line<br />
|
||||||
line</p>
|
line</p>
|
@ -1,2 +1,2 @@
|
|||||||
line
|
line
|
||||||
line
|
line
|
9
test/data/separated_nested_list.html
Normal file
9
test/data/separated_nested_list.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<p>li</p>
|
||||||
|
<ul>
|
||||||
|
<li>li</li>
|
||||||
|
<li>li</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
4
test/data/separated_nested_list.md
Normal file
4
test/data/separated_nested_list.md
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
- li
|
||||||
|
|
||||||
|
- li
|
||||||
|
- li
|
@ -1,5 +1,5 @@
|
|||||||
<h1>h1</h1>
|
<h1>h1</h1>
|
||||||
<h2>h2</h2>
|
<h2>h2</h2>
|
||||||
<h2>single character</h2>
|
<h2>single character</h2>
|
||||||
<p>not a header</p>
|
<p>not a header</p>
|
||||||
<hr />
|
<hr />
|
@ -1,12 +1,12 @@
|
|||||||
h1
|
h1
|
||||||
==
|
==
|
||||||
|
|
||||||
h2
|
h2
|
||||||
--
|
--
|
||||||
|
|
||||||
single character
|
single character
|
||||||
-
|
-
|
||||||
|
|
||||||
not a header
|
not a header
|
||||||
|
|
||||||
------------
|
------------
|
5
test/data/span-level_html.html
Normal file
5
test/data/span-level_html.html
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<p>an <b>important</b> <a href=''>link</a></p>
|
||||||
|
<p>broken<br/>
|
||||||
|
line</p>
|
||||||
|
<p><b>inline tag</b> at the beginning</p>
|
||||||
|
<p><span><a href="http://example.com">http://example.com</a></span></p>
|
8
test/data/span-level_html.md
Normal file
8
test/data/span-level_html.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
an <b>important</b> <a href=''>link</a>
|
||||||
|
|
||||||
|
broken<br/>
|
||||||
|
line
|
||||||
|
|
||||||
|
<b>inline tag</b> at the beginning
|
||||||
|
|
||||||
|
<span>http://example.com</span>
|
@ -1,6 +1,6 @@
|
|||||||
<p>AT&T has an ampersand in their name</p>
|
<p>AT&T has an ampersand in their name</p>
|
||||||
<p>this & that</p>
|
<p>this & that</p>
|
||||||
<p>4 < 5 and 6 > 5</p>
|
<p>4 < 5 and 6 > 5</p>
|
||||||
<p><a href="http://example.com/autolink?a=1&b=2">http://example.com/autolink?a=1&b=2</a></p>
|
<p><a href="http://example.com/autolink?a=1&b=2">http://example.com/autolink?a=1&b=2</a></p>
|
||||||
<p><a href="/script?a=1&b=2">inline link</a></p>
|
<p><a href="/script?a=1&b=2">inline link</a></p>
|
||||||
<p><a href="http://example.com/?a=1&b=2">reference link</a></p>
|
<p><a href="http://example.com/?a=1&b=2">reference link</a></p>
|
@ -1,13 +1,13 @@
|
|||||||
AT&T has an ampersand in their name
|
AT&T has an ampersand in their name
|
||||||
|
|
||||||
this & that
|
this & that
|
||||||
|
|
||||||
4 < 5 and 6 > 5
|
4 < 5 and 6 > 5
|
||||||
|
|
||||||
<http://example.com/autolink?a=1&b=2>
|
<http://example.com/autolink?a=1&b=2>
|
||||||
|
|
||||||
[inline link](/script?a=1&b=2)
|
[inline link](/script?a=1&b=2)
|
||||||
|
|
||||||
[reference link][1]
|
[reference link][1]
|
||||||
|
|
||||||
[1]: http://example.com/?a=1&b=2
|
[1]: http://example.com/?a=1&b=2
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user