diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100755 index 00000000..095d2f31 --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,19 @@ + + + + + + ./tests + + + diff --git a/tests/MardownTest.php b/tests/MardownTest.php new file mode 100755 index 00000000..3211c8a8 --- /dev/null +++ b/tests/MardownTest.php @@ -0,0 +1,42 @@ +getPath(); + $base = $file->getBaseName('.md'); + + $ar[$base] = array + ( + file_get_contents($path . DIRECTORY_SEPARATOR . $base . '.md'), + file_get_contents($path . DIRECTORY_SEPARATOR . $base . '.html') + ); + } + + return $ar; + } + + /** + * @dataProvider transformProvider + */ + public function testTransform($md, $html) + { + $this->assertEquals($html . "\n", self::$md->transform($md)); + } +} \ No newline at end of file diff --git a/tests/bootstrap.php b/tests/bootstrap.php new file mode 100755 index 00000000..ea40ebec --- /dev/null +++ b/tests/bootstrap.php @@ -0,0 +1,4 @@ +Header 1 + +

Header 2

+ +

Markdown

+ +

Markdown

+ +

link

+ +

img

+ +

link

+ +

ref

+ +

img

\ No newline at end of file diff --git a/tests/samples/attributes.md b/tests/samples/attributes.md new file mode 100755 index 00000000..aa761747 --- /dev/null +++ b/tests/samples/attributes.md @@ -0,0 +1,20 @@ +Header 1 {#header1} +======== + +## Header 2 ## {#header2} + +## Markdown ## {.main} + +## Markdown ## {.main .highlight #markdown} + +[link](url){#id .class} + +![img](url){#id .class} + +[link][ref] + +[ref] + +![img][ref] + +[ref]: url "optional title" {#id .class} \ No newline at end of file diff --git a/tests/samples/automatic-email.html b/tests/samples/automatic-email.html new file mode 100755 index 00000000..992a6a28 --- /dev/null +++ b/tests/samples/automatic-email.html @@ -0,0 +1 @@ +

address@example.com

\ No newline at end of file diff --git a/tests/samples/automatic-email.md b/tests/samples/automatic-email.md new file mode 100755 index 00000000..2b85f8a3 --- /dev/null +++ b/tests/samples/automatic-email.md @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/samples/automatic-escaping.html b/tests/samples/automatic-escaping.html new file mode 100755 index 00000000..d879b43f --- /dev/null +++ b/tests/samples/automatic-escaping.html @@ -0,0 +1,5 @@ +

©

+ +

AT&T

+ +

4 < 5

\ No newline at end of file diff --git a/tests/samples/automatic-escaping.md b/tests/samples/automatic-escaping.md new file mode 100755 index 00000000..e36a36c0 --- /dev/null +++ b/tests/samples/automatic-escaping.md @@ -0,0 +1,5 @@ +© + +AT&T + +4 < 5 \ No newline at end of file diff --git a/tests/samples/automatic-link.html b/tests/samples/automatic-link.html new file mode 100755 index 00000000..79a0b941 --- /dev/null +++ b/tests/samples/automatic-link.html @@ -0,0 +1 @@ +

http://example.com/

\ No newline at end of file diff --git a/tests/samples/automatic-link.md b/tests/samples/automatic-link.md new file mode 100755 index 00000000..1fd1a4f0 --- /dev/null +++ b/tests/samples/automatic-link.md @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/samples/backlash-escapes.html b/tests/samples/backlash-escapes.html new file mode 100755 index 00000000..64ef8f35 --- /dev/null +++ b/tests/samples/backlash-escapes.html @@ -0,0 +1 @@ +

\`*_{}[]()#+-.!:|

\ No newline at end of file diff --git a/tests/samples/backlash-escapes.md b/tests/samples/backlash-escapes.md new file mode 100755 index 00000000..9b7aba6e --- /dev/null +++ b/tests/samples/backlash-escapes.md @@ -0,0 +1 @@ +\\\`\*\_\{\}\[\]\(\)\#\+\-\.\!\:\| \ No newline at end of file diff --git a/tests/samples/blockquote-and-more.html b/tests/samples/blockquote-and-more.html new file mode 100755 index 00000000..f0cfaabb --- /dev/null +++ b/tests/samples/blockquote-and-more.html @@ -0,0 +1,13 @@ +
+

This is a header.

+ +
    +
  1. This is the first list item.
  2. +
  3. This is the second list item.
  4. +
+ +

Here's some example code:

+ +
return shell_exec("echo $input | $markdown_script");
+
+
\ No newline at end of file diff --git a/tests/samples/blockquote-and-more.md b/tests/samples/blockquote-and-more.md new file mode 100755 index 00000000..eea196e9 --- /dev/null +++ b/tests/samples/blockquote-and-more.md @@ -0,0 +1,8 @@ +> ## This is a header. +> +> 1. This is the first list item. +> 2. This is the second list item. +> +> Here's some example code: +> +> return shell_exec("echo $input | $markdown_script"); \ No newline at end of file diff --git a/tests/samples/blockquote-lazy.html b/tests/samples/blockquote-lazy.html new file mode 100755 index 00000000..84a2a7a3 --- /dev/null +++ b/tests/samples/blockquote-lazy.html @@ -0,0 +1,8 @@ +
+

This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. + Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.

+ +

Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse + id sem consectetuer libero luctus adipiscing.

+
\ No newline at end of file diff --git a/tests/samples/blockquote-lazy.md b/tests/samples/blockquote-lazy.md new file mode 100755 index 00000000..96610d66 --- /dev/null +++ b/tests/samples/blockquote-lazy.md @@ -0,0 +1,6 @@ +> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, +consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. +Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. + +> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse +id sem consectetuer libero luctus adipiscing. \ No newline at end of file diff --git a/tests/samples/blockquote-nested.html b/tests/samples/blockquote-nested.html new file mode 100755 index 00000000..8ec1a4d9 --- /dev/null +++ b/tests/samples/blockquote-nested.html @@ -0,0 +1,9 @@ +
+

This is the first level of quoting.

+ +
+

This is nested blockquote.

+
+ +

Back to the first level.

+
\ No newline at end of file diff --git a/tests/samples/blockquote-nested.md b/tests/samples/blockquote-nested.md new file mode 100755 index 00000000..76ec49e0 --- /dev/null +++ b/tests/samples/blockquote-nested.md @@ -0,0 +1,5 @@ +> This is the first level of quoting. +> +> > This is nested blockquote. +> +> Back to the first level. \ No newline at end of file diff --git a/tests/samples/blockquote.html b/tests/samples/blockquote.html new file mode 100755 index 00000000..84a2a7a3 --- /dev/null +++ b/tests/samples/blockquote.html @@ -0,0 +1,8 @@ +
+

This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. + Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.

+ +

Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse + id sem consectetuer libero luctus adipiscing.

+
\ No newline at end of file diff --git a/tests/samples/blockquote.md b/tests/samples/blockquote.md new file mode 100755 index 00000000..2c664853 --- /dev/null +++ b/tests/samples/blockquote.md @@ -0,0 +1,6 @@ +> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, +> consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. +> Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. +> +> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse +> id sem consectetuer libero luctus adipiscing. \ No newline at end of file diff --git a/tests/samples/code-backtick.html b/tests/samples/code-backtick.html new file mode 100755 index 00000000..e2adbddb --- /dev/null +++ b/tests/samples/code-backtick.html @@ -0,0 +1,5 @@ +

There is a literal backtick (`) here.

+ +

A single backtick in a code span: `

+ +

A backtick-delimited string in a code span: `foo`

\ No newline at end of file diff --git a/tests/samples/code-backtick.md b/tests/samples/code-backtick.md new file mode 100755 index 00000000..0a9e2fe7 --- /dev/null +++ b/tests/samples/code-backtick.md @@ -0,0 +1,5 @@ +``There is a literal backtick (`) here.`` + +A single backtick in a code span: `` ` `` + +A backtick-delimited string in a code span: `` `foo` `` \ No newline at end of file diff --git a/tests/samples/code-escaped.html b/tests/samples/code-escaped.html new file mode 100755 index 00000000..a5d53dec --- /dev/null +++ b/tests/samples/code-escaped.html @@ -0,0 +1 @@ +

&#8212; is the decimal-encoded equivalent of &mdash;.

\ No newline at end of file diff --git a/tests/samples/code-escaped.md b/tests/samples/code-escaped.md new file mode 100755 index 00000000..4c92707a --- /dev/null +++ b/tests/samples/code-escaped.md @@ -0,0 +1 @@ +`—` is the decimal-encoded equivalent of `—`. \ No newline at end of file diff --git a/tests/samples/code-html.html b/tests/samples/code-html.html new file mode 100755 index 00000000..8daf2241 --- /dev/null +++ b/tests/samples/code-html.html @@ -0,0 +1 @@ +

Please don't use any <blink> tags.

\ No newline at end of file diff --git a/tests/samples/code-html.md b/tests/samples/code-html.md new file mode 100755 index 00000000..434d25d8 --- /dev/null +++ b/tests/samples/code-html.md @@ -0,0 +1 @@ +Please don't use any `` tags. \ No newline at end of file diff --git a/tests/samples/code.html b/tests/samples/code.html new file mode 100755 index 00000000..7472ce0b --- /dev/null +++ b/tests/samples/code.html @@ -0,0 +1 @@ +

Use the printf() function.

\ No newline at end of file diff --git a/tests/samples/code.md b/tests/samples/code.md new file mode 100755 index 00000000..a41e97ba --- /dev/null +++ b/tests/samples/code.md @@ -0,0 +1 @@ +Use the `printf()` function. \ No newline at end of file diff --git a/tests/samples/codeblock-escape.html b/tests/samples/codeblock-escape.html new file mode 100755 index 00000000..d38b7418 --- /dev/null +++ b/tests/samples/codeblock-escape.html @@ -0,0 +1,4 @@ +
<div class="footer">
+    &copy; 2004 Foo Corporation
+</div>
+
\ No newline at end of file diff --git a/tests/samples/codeblock-escape.md b/tests/samples/codeblock-escape.md new file mode 100755 index 00000000..31887502 --- /dev/null +++ b/tests/samples/codeblock-escape.md @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/tests/samples/codeblock-multiline.html b/tests/samples/codeblock-multiline.html new file mode 100755 index 00000000..4025e571 --- /dev/null +++ b/tests/samples/codeblock-multiline.html @@ -0,0 +1,6 @@ +

Here is an example of AppleScript:

+ +
tell application "Foo"
+    beep
+end tell
+
\ No newline at end of file diff --git a/tests/samples/codeblock-multiline.md b/tests/samples/codeblock-multiline.md new file mode 100755 index 00000000..dd75b142 --- /dev/null +++ b/tests/samples/codeblock-multiline.md @@ -0,0 +1,5 @@ +Here is an example of AppleScript: + + tell application "Foo" + beep + end tell \ No newline at end of file diff --git a/tests/samples/codeblock.html b/tests/samples/codeblock.html new file mode 100755 index 00000000..4216a039 --- /dev/null +++ b/tests/samples/codeblock.html @@ -0,0 +1,4 @@ +

This is a normal paragraph:

+ +
This is a code block.
+
\ No newline at end of file diff --git a/tests/samples/codeblock.md b/tests/samples/codeblock.md new file mode 100755 index 00000000..8a46e9ac --- /dev/null +++ b/tests/samples/codeblock.md @@ -0,0 +1,3 @@ +This is a normal paragraph: + + This is a code block. \ No newline at end of file diff --git a/tests/samples/embended-markdown.html b/tests/samples/embended-markdown.html new file mode 100755 index 00000000..c7a409a9 --- /dev/null +++ b/tests/samples/embended-markdown.html @@ -0,0 +1,21 @@ +
+ +

Voici du vrai texte Markdown.

+ +
+ + + + + +
Voici du vrai texte Markdown.
+ + + + + +
+ +

Voici du vrai texte Markdown.

+ +
\ No newline at end of file diff --git a/tests/samples/embended-markdown.md b/tests/samples/embended-markdown.md new file mode 100755 index 00000000..cc7a36e6 --- /dev/null +++ b/tests/samples/embended-markdown.md @@ -0,0 +1,15 @@ +
+Voici du *vrai* texte Markdown. +
+ + + + + +
Voici du *vrai* texte Markdown.
+ + + + + +
Voici du *vrai* texte Markdown.
\ No newline at end of file diff --git a/tests/samples/emphasis-in-word.html b/tests/samples/emphasis-in-word.html new file mode 100755 index 00000000..060e78e0 --- /dev/null +++ b/tests/samples/emphasis-in-word.html @@ -0,0 +1 @@ +

unfriggingbelievable

\ No newline at end of file diff --git a/tests/samples/emphasis-in-word.md b/tests/samples/emphasis-in-word.md new file mode 100755 index 00000000..bc173949 --- /dev/null +++ b/tests/samples/emphasis-in-word.md @@ -0,0 +1 @@ +un*frigging*believable \ No newline at end of file diff --git a/tests/samples/emphasis.html b/tests/samples/emphasis.html new file mode 100755 index 00000000..7b55ca46 --- /dev/null +++ b/tests/samples/emphasis.html @@ -0,0 +1,7 @@ +

single asterisks

+ +

single underscores

+ +

double asterisks

+ +

double underscores

\ No newline at end of file diff --git a/tests/samples/emphasis.md b/tests/samples/emphasis.md new file mode 100755 index 00000000..9421e185 --- /dev/null +++ b/tests/samples/emphasis.md @@ -0,0 +1,7 @@ +*single asterisks* + +_single underscores_ + +**double asterisks** + +__double underscores__ \ No newline at end of file diff --git a/tests/samples/fenced-code-attributes.html b/tests/samples/fenced-code-attributes.html new file mode 100755 index 00000000..3e3d5b30 --- /dev/null +++ b/tests/samples/fenced-code-attributes.html @@ -0,0 +1,2 @@ +
<p>just an <b>example</b>
+
\ No newline at end of file diff --git a/tests/samples/fenced-code-attributes.md b/tests/samples/fenced-code-attributes.md new file mode 100755 index 00000000..c36f66d1 --- /dev/null +++ b/tests/samples/fenced-code-attributes.md @@ -0,0 +1,3 @@ +~~~~~~~~~~~~~~~~~~~~~~~~~ {.html #example-1} +

just an example +~~~~~~~~~~~~~~~~~~~~~~~~~ \ No newline at end of file diff --git a/tests/samples/fenced-code-class.html b/tests/samples/fenced-code-class.html new file mode 100755 index 00000000..b74347cf --- /dev/null +++ b/tests/samples/fenced-code-class.html @@ -0,0 +1,2 @@ +

<p>just an <b>example</b>
+
\ No newline at end of file diff --git a/tests/samples/fenced-code-class.md b/tests/samples/fenced-code-class.md new file mode 100755 index 00000000..552fcfa9 --- /dev/null +++ b/tests/samples/fenced-code-class.md @@ -0,0 +1,3 @@ +~~~~~~~~~~~~~~~~~~~~~~~~~ .html +

just an example +~~~~~~~~~~~~~~~~~~~~~~~~~ \ No newline at end of file diff --git a/tests/samples/fenced-code.html b/tests/samples/fenced-code.html new file mode 100755 index 00000000..fb948b71 --- /dev/null +++ b/tests/samples/fenced-code.html @@ -0,0 +1,6 @@ +

Here's an example:

+ +
function test() {
+  console.log("notice the blank line before this function?");
+}
+
\ No newline at end of file diff --git a/tests/samples/fenced-code.md b/tests/samples/fenced-code.md new file mode 100755 index 00000000..48da3a5c --- /dev/null +++ b/tests/samples/fenced-code.md @@ -0,0 +1,7 @@ +Here's an example: + +~~~ +function test() { + console.log("notice the blank line before this function?"); +} +~~~ \ No newline at end of file diff --git a/tests/samples/footnote.html b/tests/samples/footnote.html new file mode 100755 index 00000000..dc90d509 --- /dev/null +++ b/tests/samples/footnote.html @@ -0,0 +1,20 @@ +

Some text with a foot note.1

+ +

Some other text with another foot note.2

+ +

A paragraph.

+ +
+
+
    + +
  1. +

    This is another foot note. 

    +
  2. + +
  3. +

    This is a foot note. 

    +
  4. + +
+
\ No newline at end of file diff --git a/tests/samples/footnote.md b/tests/samples/footnote.md new file mode 100755 index 00000000..30504c07 --- /dev/null +++ b/tests/samples/footnote.md @@ -0,0 +1,9 @@ +[^1]: This is a foot note. + +Some text with a foot note.[^2] + +[^2]: This is another foot note. + +Some other text with another foot note.[^1] + +A paragraph. \ No newline at end of file diff --git a/tests/samples/headers-atx-closing-faulty.html b/tests/samples/headers-atx-closing-faulty.html new file mode 100755 index 00000000..7f638b99 --- /dev/null +++ b/tests/samples/headers-atx-closing-faulty.html @@ -0,0 +1,11 @@ +

Heading 1

+ +

Heading 2

+ +

Heading 3

+ +

Heading 4

+ +
Heading 5
+ +
Heading 6
\ No newline at end of file diff --git a/tests/samples/headers-atx-closing-faulty.md b/tests/samples/headers-atx-closing-faulty.md new file mode 100755 index 00000000..15810e9b --- /dev/null +++ b/tests/samples/headers-atx-closing-faulty.md @@ -0,0 +1,11 @@ +# Heading 1 ###### + +## Heading 2 ##### + +### Heading 3 #### + +#### Heading 4 ### + +##### Heading 5 ## + +###### Heading 6 # \ No newline at end of file diff --git a/tests/samples/headers-atx-closing.html b/tests/samples/headers-atx-closing.html new file mode 100755 index 00000000..7f638b99 --- /dev/null +++ b/tests/samples/headers-atx-closing.html @@ -0,0 +1,11 @@ +

Heading 1

+ +

Heading 2

+ +

Heading 3

+ +

Heading 4

+ +
Heading 5
+ +
Heading 6
\ No newline at end of file diff --git a/tests/samples/headers-atx-closing.md b/tests/samples/headers-atx-closing.md new file mode 100755 index 00000000..74a39238 --- /dev/null +++ b/tests/samples/headers-atx-closing.md @@ -0,0 +1,11 @@ +# Heading 1 # + +## Heading 2 ## + +### Heading 3 ### + +#### Heading 4 #### + +##### Heading 5 ##### + +###### Heading 6 ###### \ No newline at end of file diff --git a/tests/samples/headers-atx.html b/tests/samples/headers-atx.html new file mode 100755 index 00000000..7f638b99 --- /dev/null +++ b/tests/samples/headers-atx.html @@ -0,0 +1,11 @@ +

Heading 1

+ +

Heading 2

+ +

Heading 3

+ +

Heading 4

+ +
Heading 5
+ +
Heading 6
\ No newline at end of file diff --git a/tests/samples/headers-atx.md b/tests/samples/headers-atx.md new file mode 100755 index 00000000..67a91e53 --- /dev/null +++ b/tests/samples/headers-atx.md @@ -0,0 +1,11 @@ +# Heading 1 + +## Heading 2 + +### Heading 3 + +#### Heading 4 + +##### Heading 5 + +###### Heading 6 \ No newline at end of file diff --git a/tests/samples/headers.html b/tests/samples/headers.html new file mode 100755 index 00000000..0cb8d76e --- /dev/null +++ b/tests/samples/headers.html @@ -0,0 +1,3 @@ +

This is an H1

+ +

This is an H2

\ No newline at end of file diff --git a/tests/samples/headers.md b/tests/samples/headers.md new file mode 100755 index 00000000..f2721ad4 --- /dev/null +++ b/tests/samples/headers.md @@ -0,0 +1,5 @@ +This is an H1 +============= + +This is an H2 +------------- \ No newline at end of file diff --git a/tests/samples/hr.html b/tests/samples/hr.html new file mode 100755 index 00000000..335445f5 --- /dev/null +++ b/tests/samples/hr.html @@ -0,0 +1,9 @@ +
+ +
+ +
+ +
+ +
\ No newline at end of file diff --git a/tests/samples/hr.md b/tests/samples/hr.md new file mode 100755 index 00000000..b9bf82f7 --- /dev/null +++ b/tests/samples/hr.md @@ -0,0 +1,9 @@ +* * * + +*** + +***** + +- - - + +--------------------------------------- \ No newline at end of file diff --git a/tests/samples/image-reference.html b/tests/samples/image-reference.html new file mode 100755 index 00000000..9486b7e7 --- /dev/null +++ b/tests/samples/image-reference.html @@ -0,0 +1 @@ +

Alt text

\ No newline at end of file diff --git a/tests/samples/image-reference.md b/tests/samples/image-reference.md new file mode 100755 index 00000000..46d4f27a --- /dev/null +++ b/tests/samples/image-reference.md @@ -0,0 +1,3 @@ +![Alt text][id] + +[id]: url/to/image "Optional title attribute" \ No newline at end of file diff --git a/tests/samples/image.html b/tests/samples/image.html new file mode 100755 index 00000000..a8b65fc4 --- /dev/null +++ b/tests/samples/image.html @@ -0,0 +1,3 @@ +

Alt text

+ +

Alt text

\ No newline at end of file diff --git a/tests/samples/image.md b/tests/samples/image.md new file mode 100755 index 00000000..5dbe3cb3 --- /dev/null +++ b/tests/samples/image.md @@ -0,0 +1,3 @@ +![Alt text](/path/to/img.jpg) + +![Alt text](/path/to/img.jpg "Optional title") \ No newline at end of file diff --git a/tests/samples/inline-html.html b/tests/samples/inline-html.html new file mode 100755 index 00000000..5bb860f8 --- /dev/null +++ b/tests/samples/inline-html.html @@ -0,0 +1,9 @@ +

This is a regular paragraph.

+ + + + + +
Foo
+ +

This is another regular paragraph.

\ No newline at end of file diff --git a/tests/samples/inline-html.md b/tests/samples/inline-html.md new file mode 100755 index 00000000..a183c548 --- /dev/null +++ b/tests/samples/inline-html.md @@ -0,0 +1,9 @@ +This is a regular paragraph. + + + + + +
Foo
+ +This is another regular paragraph. \ No newline at end of file diff --git a/tests/samples/link-reference-double-quote.html b/tests/samples/link-reference-double-quote.html new file mode 100755 index 00000000..8d896459 --- /dev/null +++ b/tests/samples/link-reference-double-quote.html @@ -0,0 +1,3 @@ +

This is an example reference-style link.

+ +

This is an example reference-style link.

\ No newline at end of file diff --git a/tests/samples/link-reference-double-quote.md b/tests/samples/link-reference-double-quote.md new file mode 100755 index 00000000..2f55425d --- /dev/null +++ b/tests/samples/link-reference-double-quote.md @@ -0,0 +1,5 @@ +This is [an example][id] reference-style link. + +This is [an example] [id] reference-style link. + +[id]: http://example.com/ "Optional Title Here" \ No newline at end of file diff --git a/tests/samples/link-reference-multi-int.html b/tests/samples/link-reference-multi-int.html new file mode 100755 index 00000000..bc6fa8fc --- /dev/null +++ b/tests/samples/link-reference-multi-int.html @@ -0,0 +1,2 @@ +

I get 10 times more traffic from Google than from +Yahoo or MSN.

\ No newline at end of file diff --git a/tests/samples/link-reference-multi-int.md b/tests/samples/link-reference-multi-int.md new file mode 100755 index 00000000..263fa242 --- /dev/null +++ b/tests/samples/link-reference-multi-int.md @@ -0,0 +1,6 @@ +I get 10 times more traffic from [Google] [1] than from +[Yahoo] [2] or [MSN] [3]. + + [1]: http://google.com/ "Google" + [2]: http://search.yahoo.com/ "Yahoo Search" + [3]: http://search.msn.com/ "MSN Search" \ No newline at end of file diff --git a/tests/samples/link-reference-multi-name.html b/tests/samples/link-reference-multi-name.html new file mode 100755 index 00000000..bc6fa8fc --- /dev/null +++ b/tests/samples/link-reference-multi-name.html @@ -0,0 +1,2 @@ +

I get 10 times more traffic from Google than from +Yahoo or MSN.

\ No newline at end of file diff --git a/tests/samples/link-reference-multi-name.md b/tests/samples/link-reference-multi-name.md new file mode 100755 index 00000000..35154b48 --- /dev/null +++ b/tests/samples/link-reference-multi-name.md @@ -0,0 +1,6 @@ +I get 10 times more traffic from [Google][] than from +[Yahoo][] or [MSN][]. + + [google]: http://google.com/ "Google" + [yahoo]: http://search.yahoo.com/ "Yahoo Search" + [msn]: http://search.msn.com/ "MSN Search" \ No newline at end of file diff --git a/tests/samples/link-reference-multiline.html b/tests/samples/link-reference-multiline.html new file mode 100755 index 00000000..faac9b13 --- /dev/null +++ b/tests/samples/link-reference-multiline.html @@ -0,0 +1 @@ +

This is an example reference-style link.

\ No newline at end of file diff --git a/tests/samples/link-reference-multiline.md b/tests/samples/link-reference-multiline.md new file mode 100755 index 00000000..7b587501 --- /dev/null +++ b/tests/samples/link-reference-multiline.md @@ -0,0 +1,4 @@ +This is [an example][id] reference-style link. + +[id]: http://example.com/longish/path/to/resource/here + "Optional Title Here" \ No newline at end of file diff --git a/tests/samples/link-reference-name.html b/tests/samples/link-reference-name.html new file mode 100755 index 00000000..4d565c7b --- /dev/null +++ b/tests/samples/link-reference-name.html @@ -0,0 +1 @@ +

Google

\ No newline at end of file diff --git a/tests/samples/link-reference-name.md b/tests/samples/link-reference-name.md new file mode 100755 index 00000000..d1c7f779 --- /dev/null +++ b/tests/samples/link-reference-name.md @@ -0,0 +1,3 @@ +[Google][] + +[Google]: http://google.com/ \ No newline at end of file diff --git a/tests/samples/link-reference-parentheses.html b/tests/samples/link-reference-parentheses.html new file mode 100755 index 00000000..c9468f25 --- /dev/null +++ b/tests/samples/link-reference-parentheses.html @@ -0,0 +1 @@ +

This is an example reference-style link.

\ No newline at end of file diff --git a/tests/samples/link-reference-parentheses.md b/tests/samples/link-reference-parentheses.md new file mode 100755 index 00000000..68fade0c --- /dev/null +++ b/tests/samples/link-reference-parentheses.md @@ -0,0 +1,3 @@ +This is [an example][id] reference-style link. + +[id]: http://example.com/ (Optional Title Here) \ No newline at end of file diff --git a/tests/samples/link-reference-space.html b/tests/samples/link-reference-space.html new file mode 100755 index 00000000..78d0227f --- /dev/null +++ b/tests/samples/link-reference-space.html @@ -0,0 +1 @@ +

Visit Daring Fireball for more information.

\ No newline at end of file diff --git a/tests/samples/link-reference-space.md b/tests/samples/link-reference-space.md new file mode 100755 index 00000000..036f9b76 --- /dev/null +++ b/tests/samples/link-reference-space.md @@ -0,0 +1,3 @@ +Visit [Daring Fireball][] for more information. + +[Daring Fireball]: http://daringfireball.net/ \ No newline at end of file diff --git a/tests/samples/link-relative.html b/tests/samples/link-relative.html new file mode 100755 index 00000000..f083ca85 --- /dev/null +++ b/tests/samples/link-relative.html @@ -0,0 +1 @@ +

See my About page for details.

\ No newline at end of file diff --git a/tests/samples/link-relative.md b/tests/samples/link-relative.md new file mode 100755 index 00000000..d7624251 --- /dev/null +++ b/tests/samples/link-relative.md @@ -0,0 +1 @@ +See my [About](/about/) page for details. \ No newline at end of file diff --git a/tests/samples/link-with-title.html b/tests/samples/link-with-title.html new file mode 100755 index 00000000..373c3747 --- /dev/null +++ b/tests/samples/link-with-title.html @@ -0,0 +1 @@ +

This is an example inline link.

\ No newline at end of file diff --git a/tests/samples/link-with-title.md b/tests/samples/link-with-title.md new file mode 100755 index 00000000..399fdf07 --- /dev/null +++ b/tests/samples/link-with-title.md @@ -0,0 +1 @@ +This is [an example](http://example.com/ "Title") inline link. \ No newline at end of file diff --git a/tests/samples/link.html b/tests/samples/link.html new file mode 100755 index 00000000..0dff9e03 --- /dev/null +++ b/tests/samples/link.html @@ -0,0 +1 @@ +

This link has no title attribute.

\ No newline at end of file diff --git a/tests/samples/link.md b/tests/samples/link.md new file mode 100755 index 00000000..d2613db4 --- /dev/null +++ b/tests/samples/link.md @@ -0,0 +1 @@ +[This link](http://example.net/) has no title attribute. \ No newline at end of file diff --git a/tests/samples/list-asterisk.html b/tests/samples/list-asterisk.html new file mode 100755 index 00000000..234bf200 --- /dev/null +++ b/tests/samples/list-asterisk.html @@ -0,0 +1,5 @@ +
    +
  • Red
  • +
  • Green
  • +
  • Blue
  • +
\ No newline at end of file diff --git a/tests/samples/list-asterisk.md b/tests/samples/list-asterisk.md new file mode 100755 index 00000000..2365f0c9 --- /dev/null +++ b/tests/samples/list-asterisk.md @@ -0,0 +1,3 @@ +* Red +* Green +* Blue \ No newline at end of file diff --git a/tests/samples/list-blockquote.html b/tests/samples/list-blockquote.html new file mode 100755 index 00000000..27612646 --- /dev/null +++ b/tests/samples/list-blockquote.html @@ -0,0 +1,8 @@ +
    +
  • A list item with a blockquote:

    + +
    +

    This is a blockquote + inside a list item.

    +
  • +
\ No newline at end of file diff --git a/tests/samples/list-blockquote.md b/tests/samples/list-blockquote.md new file mode 100755 index 00000000..50c1c9d8 --- /dev/null +++ b/tests/samples/list-blockquote.md @@ -0,0 +1,4 @@ +* A list item with a blockquote: + + > This is a blockquote + > inside a list item. \ No newline at end of file diff --git a/tests/samples/list-cancel.html b/tests/samples/list-cancel.html new file mode 100755 index 00000000..08e34ab9 --- /dev/null +++ b/tests/samples/list-cancel.html @@ -0,0 +1 @@ +

1986. What a great season.

\ No newline at end of file diff --git a/tests/samples/list-cancel.md b/tests/samples/list-cancel.md new file mode 100755 index 00000000..1ef6c95b --- /dev/null +++ b/tests/samples/list-cancel.md @@ -0,0 +1 @@ +1986\. What a great season. \ No newline at end of file diff --git a/tests/samples/list-codeblock.html b/tests/samples/list-codeblock.html new file mode 100755 index 00000000..b0f2a51d --- /dev/null +++ b/tests/samples/list-codeblock.html @@ -0,0 +1,6 @@ +
    +
  • A list item with a code block:

    + +
    <code goes here>
    +
  • +
\ No newline at end of file diff --git a/tests/samples/list-codeblock.md b/tests/samples/list-codeblock.md new file mode 100755 index 00000000..9805e2d0 --- /dev/null +++ b/tests/samples/list-codeblock.md @@ -0,0 +1,3 @@ +* A list item with a code block: + + \ No newline at end of file diff --git a/tests/samples/list-definition-lazy.html b/tests/samples/list-definition-lazy.html new file mode 100755 index 00000000..d41721b8 --- /dev/null +++ b/tests/samples/list-definition-lazy.html @@ -0,0 +1,8 @@ +
+
Apple
+
Pomaceous fruit of plants of the genus Malus in +the family Rosaceae.
+ +
Orange
+
The fruit of an evergreen tree of the genus Citrus.
+
\ No newline at end of file diff --git a/tests/samples/list-definition-lazy.md b/tests/samples/list-definition-lazy.md new file mode 100755 index 00000000..2c9be483 --- /dev/null +++ b/tests/samples/list-definition-lazy.md @@ -0,0 +1,6 @@ +Apple +: Pomaceous fruit of plants of the genus Malus in +the family Rosaceae. + +Orange +: The fruit of an evergreen tree of the genus Citrus. \ No newline at end of file diff --git a/tests/samples/list-definition-multiple-definition.html b/tests/samples/list-definition-multiple-definition.html new file mode 100755 index 00000000..7134d21a --- /dev/null +++ b/tests/samples/list-definition-multiple-definition.html @@ -0,0 +1,10 @@ +
+
Apple
+
Pomaceous fruit of plants of the genus Malus in +the family Rosaceae.
+ +
An american computer company
+ +
Orange
+
The fruit of an evergreen tree of the genus Citrus.
+
\ No newline at end of file diff --git a/tests/samples/list-definition-multiple-definition.md b/tests/samples/list-definition-multiple-definition.md new file mode 100755 index 00000000..0364abdb --- /dev/null +++ b/tests/samples/list-definition-multiple-definition.md @@ -0,0 +1,7 @@ +Apple +: Pomaceous fruit of plants of the genus Malus in + the family Rosaceae. +: An american computer company + +Orange +: The fruit of an evergreen tree of the genus Citrus. \ No newline at end of file diff --git a/tests/samples/list-definition-multiple-terms.html b/tests/samples/list-definition-multiple-terms.html new file mode 100755 index 00000000..84c471e4 --- /dev/null +++ b/tests/samples/list-definition-multiple-terms.html @@ -0,0 +1,9 @@ +
+
Apple
+
Pomme
+
Pomaceous fruit of plants of the genus Malus in +the family Rosaceae.
+ +
Orange
+
The fruit of an evergreen tree of the genus Citrus.
+
\ No newline at end of file diff --git a/tests/samples/list-definition-multiple-terms.md b/tests/samples/list-definition-multiple-terms.md new file mode 100755 index 00000000..6e9d68ec --- /dev/null +++ b/tests/samples/list-definition-multiple-terms.md @@ -0,0 +1,7 @@ +Apple +Pomme +: Pomaceous fruit of plants of the genus Malus in + the family Rosaceae. + +Orange +: The fruit of an evergreen tree of the genus Citrus. \ No newline at end of file diff --git a/tests/samples/list-definition-paragraph.html b/tests/samples/list-definition-paragraph.html new file mode 100755 index 00000000..96fc0cc3 --- /dev/null +++ b/tests/samples/list-definition-paragraph.html @@ -0,0 +1,16 @@ +
+
Apple
+
+

Pomaceous fruit of plants of the genus Malus in +the family Rosaceae.

+
+ +
+

An american computer company

+
+ +
Orange
+
+

The fruit of an evergreen tree of the genus Citrus.

+
+
\ No newline at end of file diff --git a/tests/samples/list-definition-paragraph.md b/tests/samples/list-definition-paragraph.md new file mode 100755 index 00000000..e12a056e --- /dev/null +++ b/tests/samples/list-definition-paragraph.md @@ -0,0 +1,10 @@ +Apple + +: Pomaceous fruit of plants of the genus Malus in + the family Rosaceae. + +: An american computer company + +Orange + +: The fruit of an evergreen tree of the genus Citrus. \ No newline at end of file diff --git a/tests/samples/list-definition.html b/tests/samples/list-definition.html new file mode 100755 index 00000000..d41721b8 --- /dev/null +++ b/tests/samples/list-definition.html @@ -0,0 +1,8 @@ +
+
Apple
+
Pomaceous fruit of plants of the genus Malus in +the family Rosaceae.
+ +
Orange
+
The fruit of an evergreen tree of the genus Citrus.
+
\ No newline at end of file diff --git a/tests/samples/list-definition.md b/tests/samples/list-definition.md new file mode 100755 index 00000000..c51082e7 --- /dev/null +++ b/tests/samples/list-definition.md @@ -0,0 +1,6 @@ +Apple +: Pomaceous fruit of plants of the genus Malus in + the family Rosaceae. + +Orange +: The fruit of an evergreen tree of the genus Citrus. \ No newline at end of file diff --git a/tests/samples/list-fenced-code.html b/tests/samples/list-fenced-code.html new file mode 100755 index 00000000..b741390a --- /dev/null +++ b/tests/samples/list-fenced-code.html @@ -0,0 +1,9 @@ +
    +
  1. Element of a list

    + +

    Not an idented code block, but a second paragrah +in the element.

    + +
    This is a fenced code block.
    +
  2. +
\ No newline at end of file diff --git a/tests/samples/list-fenced-code.md b/tests/samples/list-fenced-code.md new file mode 100755 index 00000000..b6097aaa --- /dev/null +++ b/tests/samples/list-fenced-code.md @@ -0,0 +1,8 @@ +1. Element of a list + + Not an idented code block, but a second paragrah + in the element. + + ~~~ + This is a fenced code block. + ~~~ \ No newline at end of file diff --git a/tests/samples/list-hanging-indents-lazy.html b/tests/samples/list-hanging-indents-lazy.html new file mode 100755 index 00000000..02b8e82e --- /dev/null +++ b/tests/samples/list-hanging-indents-lazy.html @@ -0,0 +1,7 @@ +
    +
  • Lorem ipsum dolor sit amet, consectetuer adipiscing elit. +Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, +viverra nec, fringilla in, laoreet vitae, risus.
  • +
  • Donec sit amet nisl. Aliquam semper ipsum sit amet velit. +Suspendisse id sem consectetuer libero luctus adipiscing.
  • +
\ No newline at end of file diff --git a/tests/samples/list-hanging-indents-lazy.md b/tests/samples/list-hanging-indents-lazy.md new file mode 100755 index 00000000..db7de761 --- /dev/null +++ b/tests/samples/list-hanging-indents-lazy.md @@ -0,0 +1,5 @@ +* Lorem ipsum dolor sit amet, consectetuer adipiscing elit. +Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, +viverra nec, fringilla in, laoreet vitae, risus. +* Donec sit amet nisl. Aliquam semper ipsum sit amet velit. +Suspendisse id sem consectetuer libero luctus adipiscing. \ No newline at end of file diff --git a/tests/samples/list-hanging-indents.html b/tests/samples/list-hanging-indents.html new file mode 100755 index 00000000..02b8e82e --- /dev/null +++ b/tests/samples/list-hanging-indents.html @@ -0,0 +1,7 @@ +
    +
  • Lorem ipsum dolor sit amet, consectetuer adipiscing elit. +Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, +viverra nec, fringilla in, laoreet vitae, risus.
  • +
  • Donec sit amet nisl. Aliquam semper ipsum sit amet velit. +Suspendisse id sem consectetuer libero luctus adipiscing.
  • +
\ No newline at end of file diff --git a/tests/samples/list-hanging-indents.md b/tests/samples/list-hanging-indents.md new file mode 100755 index 00000000..fee2a3c8 --- /dev/null +++ b/tests/samples/list-hanging-indents.md @@ -0,0 +1,5 @@ +* Lorem ipsum dolor sit amet, consectetuer adipiscing elit. + Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, + viverra nec, fringilla in, laoreet vitae, risus. +* Donec sit amet nisl. Aliquam semper ipsum sit amet velit. + Suspendisse id sem consectetuer libero luctus adipiscing. \ No newline at end of file diff --git a/tests/samples/list-minus.html b/tests/samples/list-minus.html new file mode 100755 index 00000000..234bf200 --- /dev/null +++ b/tests/samples/list-minus.html @@ -0,0 +1,5 @@ +
    +
  • Red
  • +
  • Green
  • +
  • Blue
  • +
\ No newline at end of file diff --git a/tests/samples/list-minus.md b/tests/samples/list-minus.md new file mode 100755 index 00000000..19c25333 --- /dev/null +++ b/tests/samples/list-minus.md @@ -0,0 +1,3 @@ ++ Red ++ Green ++ Blue \ No newline at end of file diff --git a/tests/samples/list-multiple-paragrapah-lazy.html b/tests/samples/list-multiple-paragrapah-lazy.html new file mode 100755 index 00000000..e35f6762 --- /dev/null +++ b/tests/samples/list-multiple-paragrapah-lazy.html @@ -0,0 +1,8 @@ +
    +
  • This is a list item with two paragraphs.

    + +

    This is the second paragraph in the list item. You're +only required to indent the first line. Lorem ipsum dolor +sit amet, consectetuer adipiscing elit.

  • +
  • Another item in the same list.

  • +
\ No newline at end of file diff --git a/tests/samples/list-multiple-paragrapah-lazy.md b/tests/samples/list-multiple-paragrapah-lazy.md new file mode 100755 index 00000000..19dd8b49 --- /dev/null +++ b/tests/samples/list-multiple-paragrapah-lazy.md @@ -0,0 +1,7 @@ +* This is a list item with two paragraphs. + + This is the second paragraph in the list item. You're +only required to indent the first line. Lorem ipsum dolor +sit amet, consectetuer adipiscing elit. + +* Another item in the same list. \ No newline at end of file diff --git a/tests/samples/list-multiple-paragrapah.html b/tests/samples/list-multiple-paragrapah.html new file mode 100755 index 00000000..96ed2f46 --- /dev/null +++ b/tests/samples/list-multiple-paragrapah.html @@ -0,0 +1,10 @@ +
    +
  1. This is a list item with two paragraphs. Lorem ipsum dolor +sit amet, consectetuer adipiscing elit. Aliquam hendrerit +mi posuere lectus.

    + +

    Vestibulum enim wisi, viverra nec, fringilla in, laoreet +vitae, risus. Donec sit amet nisl. Aliquam semper ipsum +sit amet velit.

  2. +
  3. Suspendisse id sem consectetuer libero luctus adipiscing.

  4. +
\ No newline at end of file diff --git a/tests/samples/list-multiple-paragrapah.md b/tests/samples/list-multiple-paragrapah.md new file mode 100755 index 00000000..2916602c --- /dev/null +++ b/tests/samples/list-multiple-paragrapah.md @@ -0,0 +1,9 @@ +1. This is a list item with two paragraphs. Lorem ipsum dolor + sit amet, consectetuer adipiscing elit. Aliquam hendrerit + mi posuere lectus. + + Vestibulum enim wisi, viverra nec, fringilla in, laoreet + vitae, risus. Donec sit amet nisl. Aliquam semper ipsum + sit amet velit. + +2. Suspendisse id sem consectetuer libero luctus adipiscing. \ No newline at end of file diff --git a/tests/samples/list-ordered-same.html b/tests/samples/list-ordered-same.html new file mode 100755 index 00000000..4d585abc --- /dev/null +++ b/tests/samples/list-ordered-same.html @@ -0,0 +1,5 @@ +
    +
  1. Bird
  2. +
  3. McHale
  4. +
  5. Parish
  6. +
\ No newline at end of file diff --git a/tests/samples/list-ordered-same.md b/tests/samples/list-ordered-same.md new file mode 100755 index 00000000..c1571faf --- /dev/null +++ b/tests/samples/list-ordered-same.md @@ -0,0 +1,3 @@ +1. Bird +1. McHale +1. Parish \ No newline at end of file diff --git a/tests/samples/list-ordered-shuffled.html b/tests/samples/list-ordered-shuffled.html new file mode 100755 index 00000000..4d585abc --- /dev/null +++ b/tests/samples/list-ordered-shuffled.html @@ -0,0 +1,5 @@ +
    +
  1. Bird
  2. +
  3. McHale
  4. +
  5. Parish
  6. +
\ No newline at end of file diff --git a/tests/samples/list-ordered-shuffled.md b/tests/samples/list-ordered-shuffled.md new file mode 100755 index 00000000..cf49a531 --- /dev/null +++ b/tests/samples/list-ordered-shuffled.md @@ -0,0 +1,3 @@ +3. Bird +1. McHale +8. Parish \ No newline at end of file diff --git a/tests/samples/list-ordered.html b/tests/samples/list-ordered.html new file mode 100755 index 00000000..4d585abc --- /dev/null +++ b/tests/samples/list-ordered.html @@ -0,0 +1,5 @@ +
    +
  1. Bird
  2. +
  3. McHale
  4. +
  5. Parish
  6. +
\ No newline at end of file diff --git a/tests/samples/list-ordered.md b/tests/samples/list-ordered.md new file mode 100755 index 00000000..31561fb8 --- /dev/null +++ b/tests/samples/list-ordered.md @@ -0,0 +1,3 @@ +1. Bird +2. McHale +3. Parish \ No newline at end of file diff --git a/tests/samples/list-paragraph.html b/tests/samples/list-paragraph.html new file mode 100755 index 00000000..df4ca2f9 --- /dev/null +++ b/tests/samples/list-paragraph.html @@ -0,0 +1,4 @@ +
    +
  • Bird

  • +
  • Magic

  • +
\ No newline at end of file diff --git a/tests/samples/list-paragraph.md b/tests/samples/list-paragraph.md new file mode 100755 index 00000000..2a5b3bb6 --- /dev/null +++ b/tests/samples/list-paragraph.md @@ -0,0 +1,3 @@ +* Bird + +* Magic \ No newline at end of file diff --git a/tests/samples/list-plus.html b/tests/samples/list-plus.html new file mode 100755 index 00000000..234bf200 --- /dev/null +++ b/tests/samples/list-plus.html @@ -0,0 +1,5 @@ +
    +
  • Red
  • +
  • Green
  • +
  • Blue
  • +
\ No newline at end of file diff --git a/tests/samples/list-plus.md b/tests/samples/list-plus.md new file mode 100755 index 00000000..19c25333 --- /dev/null +++ b/tests/samples/list-plus.md @@ -0,0 +1,3 @@ ++ Red ++ Green ++ Blue \ No newline at end of file diff --git a/tests/samples/literal-asterisk.html b/tests/samples/literal-asterisk.html new file mode 100755 index 00000000..8f103581 --- /dev/null +++ b/tests/samples/literal-asterisk.html @@ -0,0 +1 @@ +

*this text is surrounded by literal asterisks*

\ No newline at end of file diff --git a/tests/samples/literal-asterisk.md b/tests/samples/literal-asterisk.md new file mode 100755 index 00000000..4de5daee --- /dev/null +++ b/tests/samples/literal-asterisk.md @@ -0,0 +1 @@ +\*this text is surrounded by literal asterisks\* \ No newline at end of file diff --git a/tests/samples/table-align.html b/tests/samples/table-align.html new file mode 100755 index 00000000..9cc5cdff --- /dev/null +++ b/tests/samples/table-align.html @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + +
ArticleValue
Computer1600 $
Phone12 $
Tube1 $
\ No newline at end of file diff --git a/tests/samples/table-align.md b/tests/samples/table-align.md new file mode 100755 index 00000000..219f7234 --- /dev/null +++ b/tests/samples/table-align.md @@ -0,0 +1,5 @@ +| Article | Value | +| -------- | ------:| +| Computer | 1600 $ | +| Phone | 12 $ | +| Tube | 1 $ | \ No newline at end of file diff --git a/tests/samples/table.html b/tests/samples/table.html new file mode 100755 index 00000000..dd1485a4 --- /dev/null +++ b/tests/samples/table.html @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + +
First titleSecond title
help()Cell
explode()destroy
+ + + + + + + + + + + + + + + + + + +
First titleSecond title
CellCell
CellCell
\ No newline at end of file diff --git a/tests/samples/table.md b/tests/samples/table.md new file mode 100755 index 00000000..061fb7d5 --- /dev/null +++ b/tests/samples/table.md @@ -0,0 +1,9 @@ +First title | Second title +------------| ------------ +`help()` | Cell +`explode()` | **destroy** + +|First title | Second title| +|------------| ------------| +|Cell | Cell | +|Cell | Cell | \ No newline at end of file