forked from malcolmsparks/clj-markdown
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding the official Markdown test-suite for convenience.
- Loading branch information
1 parent
66c17f1
commit 7830cc1
Showing
38 changed files
with
3,523 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
src/test/resources/markdown-tests/Amps and angle encoding.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<p>AT&T has an ampersand in their name.</p> | ||
|
||
<p>AT&T is another way to write it.</p> | ||
|
||
<p>This & that.</p> | ||
|
||
<p>4 < 5.</p> | ||
|
||
<p>6 > 5.</p> | ||
|
||
<p>Here's a <a href="http://example.com/?foo=1&bar=2">link</a> with an ampersand in the URL.</p> | ||
|
||
<p>Here's a link with an amersand in the link text: <a href="http://att.com/" title="AT&T">AT&T</a>.</p> | ||
|
||
<p>Here's an inline <a href="/script?foo=1&bar=2">link</a>.</p> | ||
|
||
<p>Here's an inline <a href="/script?foo=1&bar=2">link</a>.</p> |
21 changes: 21 additions & 0 deletions
21
src/test/resources/markdown-tests/Amps and angle encoding.text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
AT&T has an ampersand in their name. | ||
|
||
AT&T is another way to write it. | ||
|
||
This & that. | ||
|
||
4 < 5. | ||
|
||
6 > 5. | ||
|
||
Here's a [link] [1] with an ampersand in the URL. | ||
|
||
Here's a link with an amersand in the link text: [AT&T] [2]. | ||
|
||
Here's an inline [link](/script?foo=1&bar=2). | ||
|
||
Here's an inline [link](</script?foo=1&bar=2>). | ||
|
||
|
||
[1]: http://example.com/?foo=1&bar=2 | ||
[2]: http://att.com/ "AT&T" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<p>Link: <a href="http://example.com/">http://example.com/</a>.</p> | ||
|
||
<p>With an ampersand: <a href="http://example.com/?foo=1&bar=2">http://example.com/?foo=1&bar=2</a></p> | ||
|
||
<ul> | ||
<li>In a list?</li> | ||
<li><a href="http://example.com/">http://example.com/</a></li> | ||
<li>It should.</li> | ||
</ul> | ||
|
||
<blockquote> | ||
<p>Blockquoted: <a href="http://example.com/">http://example.com/</a></p> | ||
</blockquote> | ||
|
||
<p>Auto-links should not occur here: <code><http://example.com/></code></p> | ||
|
||
<pre><code>or here: <http://example.com/> | ||
</code></pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Link: <http://example.com/>. | ||
|
||
With an ampersand: <http://example.com/?foo=1&bar=2> | ||
|
||
* In a list? | ||
* <http://example.com/> | ||
* It should. | ||
|
||
> Blockquoted: <http://example.com/> | ||
|
||
Auto-links should not occur here: `<http://example.com/>` | ||
|
||
or here: <http://example.com/> |
102 changes: 102 additions & 0 deletions
102
src/test/resources/markdown-tests/Backslash escapes.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
<p>These should all get escaped:</p> | ||
|
||
<p>Backslash: \</p> | ||
|
||
<p>Backtick: `</p> | ||
|
||
<p>Asterisk: *</p> | ||
|
||
<p>Underscore: _</p> | ||
|
||
<p>Left brace: {</p> | ||
|
||
<p>Right brace: }</p> | ||
|
||
<p>Left bracket: [</p> | ||
|
||
<p>Right bracket: ]</p> | ||
|
||
<p>Left paren: (</p> | ||
|
||
<p>Right paren: )</p> | ||
|
||
<p>Greater-than: ></p> | ||
|
||
<p>Hash: #</p> | ||
|
||
<p>Period: .</p> | ||
|
||
<p>Bang: !</p> | ||
|
||
<p>Plus: +</p> | ||
|
||
<p>Minus: -</p> | ||
|
||
<p>These should not, because they occur within a code block:</p> | ||
|
||
<pre><code>Backslash: \\ | ||
|
||
Backtick: \` | ||
|
||
Asterisk: \* | ||
|
||
Underscore: \_ | ||
|
||
Left brace: \{ | ||
|
||
Right brace: \} | ||
|
||
Left bracket: \[ | ||
|
||
Right bracket: \] | ||
|
||
Left paren: \( | ||
|
||
Right paren: \) | ||
|
||
Greater-than: \> | ||
|
||
Hash: \# | ||
|
||
Period: \. | ||
|
||
Bang: \! | ||
|
||
Plus: \+ | ||
|
||
Minus: \- | ||
</code></pre> | ||
|
||
<p>Nor should these, which occur in code spans:</p> | ||
|
||
<p>Backslash: <code>\\</code></p> | ||
|
||
<p>Backtick: <code>\`</code></p> | ||
|
||
<p>Asterisk: <code>\*</code></p> | ||
|
||
<p>Underscore: <code>\_</code></p> | ||
|
||
<p>Left brace: <code>\{</code></p> | ||
|
||
<p>Right brace: <code>\}</code></p> | ||
|
||
<p>Left bracket: <code>\[</code></p> | ||
|
||
<p>Right bracket: <code>\]</code></p> | ||
|
||
<p>Left paren: <code>\(</code></p> | ||
|
||
<p>Right paren: <code>\)</code></p> | ||
|
||
<p>Greater-than: <code>\></code></p> | ||
|
||
<p>Hash: <code>\#</code></p> | ||
|
||
<p>Period: <code>\.</code></p> | ||
|
||
<p>Bang: <code>\!</code></p> | ||
|
||
<p>Plus: <code>\+</code></p> | ||
|
||
<p>Minus: <code>\-</code></p> |
104 changes: 104 additions & 0 deletions
104
src/test/resources/markdown-tests/Backslash escapes.text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
These should all get escaped: | ||
|
||
Backslash: \\ | ||
|
||
Backtick: \` | ||
|
||
Asterisk: \* | ||
|
||
Underscore: \_ | ||
|
||
Left brace: \{ | ||
|
||
Right brace: \} | ||
|
||
Left bracket: \[ | ||
|
||
Right bracket: \] | ||
|
||
Left paren: \( | ||
|
||
Right paren: \) | ||
|
||
Greater-than: \> | ||
|
||
Hash: \# | ||
|
||
Period: \. | ||
|
||
Bang: \! | ||
|
||
Plus: \+ | ||
|
||
Minus: \- | ||
|
||
|
||
|
||
These should not, because they occur within a code block: | ||
|
||
Backslash: \\ | ||
|
||
Backtick: \` | ||
|
||
Asterisk: \* | ||
|
||
Underscore: \_ | ||
|
||
Left brace: \{ | ||
|
||
Right brace: \} | ||
|
||
Left bracket: \[ | ||
|
||
Right bracket: \] | ||
|
||
Left paren: \( | ||
|
||
Right paren: \) | ||
|
||
Greater-than: \> | ||
|
||
Hash: \# | ||
|
||
Period: \. | ||
|
||
Bang: \! | ||
|
||
Plus: \+ | ||
|
||
Minus: \- | ||
|
||
|
||
Nor should these, which occur in code spans: | ||
|
||
Backslash: `\\` | ||
|
||
Backtick: `` \` `` | ||
|
||
Asterisk: `\*` | ||
|
||
Underscore: `\_` | ||
|
||
Left brace: `\{` | ||
|
||
Right brace: `\}` | ||
|
||
Left bracket: `\[` | ||
|
||
Right bracket: `\]` | ||
|
||
Left paren: `\(` | ||
|
||
Right paren: `\)` | ||
|
||
Greater-than: `\>` | ||
|
||
Hash: `\#` | ||
|
||
Period: `\.` | ||
|
||
Bang: `\!` | ||
|
||
Plus: `\+` | ||
|
||
Minus: `\-` |
15 changes: 15 additions & 0 deletions
15
src/test/resources/markdown-tests/Blockquotes with code blocks.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<blockquote> | ||
<p>Example:</p> | ||
|
||
<pre><code>sub status { | ||
print "working"; | ||
} | ||
</code></pre> | ||
|
||
<p>Or:</p> | ||
|
||
<pre><code>sub status { | ||
return "working"; | ||
} | ||
</code></pre> | ||
</blockquote> |
11 changes: 11 additions & 0 deletions
11
src/test/resources/markdown-tests/Blockquotes with code blocks.text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
> Example: | ||
> | ||
> sub status { | ||
> print "working"; | ||
> } | ||
> | ||
> Or: | ||
> | ||
> sub status { | ||
> return "working"; | ||
> } |
8 changes: 8 additions & 0 deletions
8
src/test/resources/markdown-tests/Hard-wrapped paragraphs with list-like lines.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<p>In Markdown 1.0.0 and earlier. Version | ||
8. This line turns into a list item. | ||
Because a hard-wrapped line in the | ||
middle of a paragraph looked like a | ||
list item.</p> | ||
|
||
<p>Here's one with a bullet. | ||
* criminey.</p> |
8 changes: 8 additions & 0 deletions
8
src/test/resources/markdown-tests/Hard-wrapped paragraphs with list-like lines.text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
In Markdown 1.0.0 and earlier. Version | ||
8. This line turns into a list item. | ||
Because a hard-wrapped line in the | ||
middle of a paragraph looked like a | ||
list item. | ||
|
||
Here's one with a bullet. | ||
* criminey. |
Oops, something went wrong.