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

Compare commits

...

33 Commits

Author SHA1 Message Date
2bd2f81f4f methods should not have more than one optional parameters 2014-05-12 16:18:00 +03:00
e318e66de5 improve consistency 2014-05-12 00:41:00 +03:00
0820d0a607 paragraph doesn't have to use a type 2014-05-12 00:34:47 +03:00
b8d1cfe91a improve extensibility 2014-05-11 22:31:02 +03:00
d85a233611 Merge pull request #171 from scarwu/master
identifyEscapeSequence() needs Array check
2014-05-11 20:57:05 +03:00
973d4a866d add array check 2014-05-11 23:36:01 +08:00
d19c2b6942 improve names 2014-05-10 16:28:00 +03:00
4dde57451d fix consecutive reference links 2014-05-06 17:05:49 +03:00
44686c4f1e improve extensibility 2014-05-06 01:12:27 +03:00
db02ecf259 "reference" is a definition 2014-05-05 14:43:31 +03:00
aa004d4595 improve code organisation 2014-05-05 14:39:40 +03:00
1bb65457ed remove unnecessary comments 2014-05-05 13:46:26 +03:00
0c9a4af8ab improve naming consistency 2014-05-03 18:02:06 +03:00
cc94c1b584 resolve #167 2014-05-02 18:21:10 +03:00
e8d8801db4 resolve #135 2014-05-01 02:44:35 +03:00
521803cdcd resolve #136 2014-05-01 02:42:01 +03:00
0eb480324c resolve #145 2014-05-01 02:02:14 +03:00
7c78aff578 resolve #163 2014-05-01 01:47:14 +03:00
2a5f99547c resolve #162 2014-05-01 01:05:31 +03:00
e373391e7d resolve #164 2014-05-01 00:29:21 +03:00
9fa415bcc5 resolve #160 2014-04-28 21:54:38 +03:00
37416b5f07 simplify folder name 2014-04-28 21:53:34 +03:00
83d3e3dbbf improve readability 2014-04-28 02:27:05 +03:00
307a987cb6 improve naming consistency 2014-04-28 02:14:46 +03:00
eab3cbf255 remove unnecessary nesting 2014-04-28 02:10:18 +03:00
cf7f32f891 definitions are not blocks 2014-04-27 01:54:52 +03:00
4150e00dc4 remove composer dependency 2014-04-26 01:09:28 +03:00
22affa124b travis should be able to run tests in 5.2 2014-04-26 01:06:15 +03:00
5e95242318 improve code consistency 2014-04-26 01:06:14 +03:00
504991a04e Merge pull request #158 from hkdobrev/travis-composer
Run composer install in Travis CI before tests
2014-04-25 00:06:06 +03:00
3d84201d74 Run composer install in Travis CI before tests
Tests are using the Composer autoloader since: cd1c030362

Because of that Composer should have actually dumped the autoloader in the `vendor/` folder,
before the tests are ran.
2014-04-25 00:01:20 +03:00
4f027386b1 "complete" calls should be more consistent 2014-04-24 23:52:42 +03:00
cd1c030362 tests should use autoloader 2014-04-24 22:44:30 +03:00
110 changed files with 593 additions and 507 deletions

View File

@ -7,3 +7,4 @@ php:
- 5.3 - 5.3
- 5.2 - 5.2
- hhvm - hhvm

File diff suppressed because it is too large Load Diff

View File

@ -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>

View File

@ -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
View File

@ -0,0 +1,3 @@
<?php
include 'Parsedown.php';

View File

@ -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>

View File

@ -1,15 +1,15 @@
# h1 # h1
## h2 ## h2
### h3 ### h3
#### h4 #### h4
##### h5 ##### h5
###### h6 ###### h6
# closed h1 # # closed h1 #
# #

View File

@ -1,8 +1,8 @@
<pre><code>&lt;?php <pre><code>&lt;?php
$message = 'Hello World!'; $message = 'Hello World!';
echo $message;</code></pre> echo $message;</code></pre>
<hr /> <hr />
<pre><code>&gt; not a quote <pre><code>&gt; 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>

View File

@ -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

View File

@ -1,6 +1,6 @@
- li - li
- li
- li - li
- li
- li
- li - li
- li
- li - li

View File

@ -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>

View File

@ -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

View File

@ -1,5 +1,5 @@
<hr /> <hr />
<hr /> <hr />
<hr /> <hr />
<hr /> <hr />
<hr /> <hr />

View File

@ -1,9 +1,9 @@
--- ---
- - - - - -
- - - - - -
*** ***
___ ___

View File

@ -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>

View File

@ -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"

View File

@ -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>

View File

@ -0,0 +1,5 @@
> quote
the rest of it
> another paragraph
the rest of it

View File

@ -1,2 +1,2 @@
<p>line<br /> <p>line<br />
line</p> line</p>

View File

@ -1,2 +1,2 @@
line line
line line

View File

@ -0,0 +1,9 @@
<ul>
<li>
<p>li</p>
<ul>
<li>li</li>
<li>li</li>
</ul>
</li>
</ul>

View File

@ -0,0 +1,4 @@
- li
- li
- li

View File

@ -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 />

View File

@ -1,12 +1,12 @@
h1 h1
== ==
h2 h2
-- --
single character single character
- -
not a header not a header
------------ ------------

View 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>

View 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>

View File

@ -1,6 +1,6 @@
<p>AT&amp;T has an ampersand in their name</p> <p>AT&amp;T has an ampersand in their name</p>
<p>this &amp; that</p> <p>this &amp; that</p>
<p>4 &lt; 5 and 6 > 5</p> <p>4 &lt; 5 and 6 > 5</p>
<p><a href="http://example.com/autolink?a=1&amp;b=2">http://example.com/autolink?a=1&amp;b=2</a></p> <p><a href="http://example.com/autolink?a=1&amp;b=2">http://example.com/autolink?a=1&amp;b=2</a></p>
<p><a href="/script?a=1&amp;b=2">inline link</a></p> <p><a href="/script?a=1&amp;b=2">inline link</a></p>
<p><a href="http://example.com/?a=1&amp;b=2">reference link</a></p> <p><a href="http://example.com/?a=1&amp;b=2">reference link</a></p>

View File

@ -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