Add markdown format support (#25)

Co-authored-by: Dawid Dziurla <dawidd0811@gmail.com>
This commit is contained in:
dougpagani
2020-11-30 12:51:34 -05:00
committed by GitHub
parent d1b07d9ed7
commit 2095e6ffe3
941 changed files with 37481 additions and 15 deletions

116
node_modules/showdown/test/bootstrap.js generated vendored Normal file
View File

@ -0,0 +1,116 @@
/**
* Created by Estevao on 08-06-2015.
*/
//jscs:disable requireCamelCaseOrUpperCaseIdentifiers
(function () {
'use strict';
require('source-map-support').install();
require('chai').should();
var fs = require('fs');
var jsdom = require('jsdom');
var document = new jsdom.JSDOM('', {}).window.document; // jshint ignore:line
function getTestSuite (dir) {
return fs.readdirSync(dir)
.filter(filter())
.map(map(dir));
}
function getHtmlToMdTestSuite (dir) {
return fs.readdirSync(dir)
.filter(filter())
.map(map2(dir));
}
function filter () {
return function (file) {
var ext = file.slice(-3);
return (ext === '.md');
};
}
function map (dir) {
return function (file) {
var name = file.replace('.md', ''),
htmlPath = dir + name + '.html',
html = fs.readFileSync(htmlPath, 'utf8'),
mdPath = dir + name + '.md',
md = fs.readFileSync(mdPath, 'utf8');
return {
name: name,
input: md,
expected: html
};
};
}
function map2 (dir) {
return function (file) {
var name = file.replace('.md', ''),
htmlPath = dir + name + '.html',
html = fs.readFileSync(htmlPath, 'utf8'),
mdPath = dir + name + '.md',
md = fs.readFileSync(mdPath, 'utf8');
return {
name: name,
input: html,
expected: md
};
};
}
function assertion (testCase, converter, type) {
return function () {
//var conv = (type === 'makeMd') ? converter.makeMd : converter.makeHtml;
testCase.actual = (type === 'makeMd') ? converter.makeMd(testCase.input, document) : converter.makeHtml(testCase.input);
testCase = normalize(testCase);
// Compare
testCase.actual.should.equal(testCase.expected);
};
}
//Normalize input/output
function normalize (testCase) {
// Normalize line returns
testCase.expected = testCase.expected.replace(/(\r\n)|\n|\r/g, '\n');
testCase.actual = testCase.actual.replace(/(\r\n)|\n|\r/g, '\n');
// Ignore all leading/trailing whitespace
testCase.expected = testCase.expected.split('\n').map(function (x) {
return x.trim();
}).join('\n');
testCase.actual = testCase.actual.split('\n').map(function (x) {
return x.trim();
}).join('\n');
// Remove extra lines
testCase.expected = testCase.expected.trim();
testCase.actual = testCase.actual.trim();
//Beautify
//testCase.expected = beautify(testCase.expected, beauOptions);
//testCase.actual = beautify(testCase.actual, beauOptions);
// Normalize line returns
testCase.expected = testCase.expected.replace(/(\r\n)|\n|\r/g, '\n');
testCase.actual = testCase.actual.replace(/(\r\n)|\n|\r/g, '\n');
return testCase;
}
module.exports = {
getTestSuite: getTestSuite,
getHtmlToMdTestSuite: getHtmlToMdTestSuite,
assertion: assertion,
normalize: normalize,
showdown: require('../.build/showdown.js')
};
})();

View File

@ -0,0 +1,4 @@
<p>This is <a href="http://example.com/" title="Optional Title Here">an example</a> reference-style link.
This is <a href="http://example.com/" title="Optional Title Here">another</a> reference-style link.
This is <a href="http://example.com/" title="Optional Title Here">a third</a> reference-style link.
This is <a href="http://example.com/" title="Optional Title Here">a fourth</a> reference-style link.</p>

View File

@ -0,0 +1,11 @@
This is [an example][id] reference-style link.
This is [another] [foo] reference-style link.
This is [a third][bar] reference-style link.
This is [a fourth][4] reference-style link.
[id]: http://example.com/ "Optional Title Here"
[foo]: http://example.com/ (Optional Title Here)
[bar]: http://example.com/ (Optional Title Here)
[4]: <http://example.com/>
"Optional Title Here"

View File

@ -0,0 +1,4 @@
<p>This is a <a href="https://en.wikipedia.org/wiki/Textile">link</a> (some other text)</p>
<p>This is a <a href="https://en.wikipedia.org/wiki/Textile_(markup">link</a> (some other text)</p>
<p>This is a <a href="https://en.wikipedia.org/wiki/Textile_(markup_language)">link</a> (some other text)</p>
<p>This is a <a href="https://en.wikipedia.org/wiki/Textile_(markup_language)/foo">link</a> (some other text)</p>

View File

@ -0,0 +1,7 @@
This is a [link](https://en.wikipedia.org/wiki/Textile) (some other text)
This is a [link](https://en.wikipedia.org/wiki/Textile_(markup) (some other text)
This is a [link](https://en.wikipedia.org/wiki/Textile_(markup_language)) (some other text)
This is a [link](https://en.wikipedia.org/wiki/Textile_(markup_language)/foo) (some other text)

View File

@ -0,0 +1 @@
<p><a href="http://example.com/">http://example.com/</a></p>

View File

@ -0,0 +1,2 @@
<http://example.com/>

View File

@ -0,0 +1,10 @@
<blockquote>
<p>a blockquote
with a 4 space indented line (not code)</p>
</blockquote>
<p>sep</p>
<blockquote>
<p>a blockquote</p>
</blockquote>
<pre><code>with some code after
</code></pre>

View File

@ -0,0 +1,8 @@
> a blockquote
with a 4 space indented line (not code)
sep
> a blockquote
with some code after

View File

@ -0,0 +1,7 @@
<pre><code>&gt; this is a pseudo blockquote
&gt; inside a code block
</code></pre>
<p>foo</p>
<pre><code>&gt; this is another bq
inside code
</code></pre>

View File

@ -0,0 +1,7 @@
> this is a pseudo blockquote
> inside a code block
foo
> this is another bq
inside code

View File

@ -0,0 +1,10 @@
<blockquote>
<h2 id="thisisaheader">This is a header.</h2>
<ol>
<li>This is the first list item.</li>
<li>This is the second list item.</li>
</ol>
<p>Here's some example code:</p>
<pre><code>return shell_exec("echo $input | $markdown_script");
</code></pre>
</blockquote>

View File

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

4
node_modules/showdown/test/cases/blockquote.html generated vendored Normal file
View File

@ -0,0 +1,4 @@
<blockquote>
<p>This is a multi line blockquote test</p>
<p>With more than one line.</p>
</blockquote>

4
node_modules/showdown/test/cases/blockquote.md generated vendored Normal file
View File

@ -0,0 +1,4 @@
> This is a multi line blockquote test
>
> With more than one line.

View File

@ -0,0 +1,3 @@
<p>This is some HTML:</p>
<pre><code>&lt;h1&gt;Heading&lt;/h1&gt;
</code></pre>

View File

@ -0,0 +1,4 @@
This is some HTML:
<h1>Heading</h1>

View File

@ -0,0 +1,7 @@
<pre><code>//**this** code _has_ special chars
var arr = ['foo', 'bar', 'baz'];
function () {
return 'foo';
}
\n
</code></pre>

View File

@ -0,0 +1,6 @@
//**this** code _has_ special chars
var arr = ['foo', 'bar', 'baz'];
function () {
return 'foo';
}
\n

3
node_modules/showdown/test/cases/code-block.html generated vendored Normal file
View File

@ -0,0 +1,3 @@
<p>This is a normal paragraph:</p>
<pre><code>This is a code block.
</code></pre>

4
node_modules/showdown/test/cases/code-block.md generated vendored Normal file
View File

@ -0,0 +1,4 @@
This is a normal paragraph:
This is a code block.

View File

@ -0,0 +1,4 @@
<p>a <strong><em>strong and em</em></strong> thingy</p>
<p>bar<strong><em>bazinga</em></strong>bar</p>
<p>a <strong><em>strong and em</em></strong> thingy</p>
<p>bar<strong><em>bazinga</em></strong>bar</p>

7
node_modules/showdown/test/cases/double-emphasis.md generated vendored Normal file
View File

@ -0,0 +1,7 @@
a ___strong and em___ thingy
bar___bazinga___bar
a ***strong and em*** thingy
bar***bazinga***bar

4
node_modules/showdown/test/cases/doubline-list.html generated vendored Normal file
View File

@ -0,0 +1,4 @@
<ul>
<li><p>Bird</p></li>
<li><p>Magic</p></li>
</ul>

4
node_modules/showdown/test/cases/doubline-list.md generated vendored Normal file
View File

@ -0,0 +1,4 @@
* Bird
* Magic

19
node_modules/showdown/test/cases/ellipsis.html generated vendored Normal file
View File

@ -0,0 +1,19 @@
<p>ellipsis in text…</p>
<p></p>
<ol>
<li>foo…</li>
<li>bar</li>
</ol>
<blockquote>
<p>ellipsis in blockquote…</p>
</blockquote>
<pre><code>ellipsis in code...
</code></pre>
<pre><code>ellipsis in code...
</code></pre>
<h1 id="ellipsisinheader">ellipsis in header…</h1>
<p>1…</p>
<ol>
<li>..</li>
</ol>
<p>1…</p>

22
node_modules/showdown/test/cases/ellipsis.md generated vendored Normal file
View File

@ -0,0 +1,22 @@
ellipsis in text...
...
1. foo...
2. bar
> ellipsis in blockquote...
```
ellipsis in code...
```
ellipsis in code...
# ellipsis in header...
1...
1. ..
1...

View File

@ -0,0 +1 @@
<p>some text <code>**foo**</code></p>

View File

@ -0,0 +1 @@
some text `**foo**`

45
node_modules/showdown/test/cases/emphasis.html generated vendored Normal file
View File

@ -0,0 +1,45 @@
<p><em>single asterisks</em></p>
<p><em>single underscores</em></p>
<p><strong>double asterisks</strong></p>
<p><strong>double underscores</strong></p>
<p>text <em>with italic sentence</em> in middle</p>
<p>text <strong>with bold sentence</strong> in middle</p>
<p>text with <strong>bold text that
spans across multiple</strong> lines</p>
<p>underscored_word</p>
<p>doubleunderscore__word</p>
<p>asterix*word</p>
<p>doubleasterix**word</p>
<p>line with_underscored word</p>
<p>line with__doubleunderscored word</p>
<p>line with*asterixed word</p>
<p>line with**doubleasterixed word</p>
<p>some line<em>with</em>inner underscores</p>
<p>some line<strong>with</strong>inner double underscores</p>
<p>some line<em>with</em>inner asterixs</p>
<p>some line<strong>with</strong>inner double asterixs</p>
<p>another line with just _one underscore</p>
<p>another line with just __one double underscore</p>
<p>another line with just *one asterix</p>
<p>another line with just **one double asterix</p>
<p>a sentence with<em>underscore and another</em>underscore</p>
<p>a sentence with<strong>doubleunderscore and another</strong>doubleunderscore</p>
<p>a sentence with<em>asterix and another</em>asterix</p>
<p>a sentence with<strong>doubleasterix and another</strong>doubleasterix</p>
<p>escaped word_with_underscores</p>
<p>escaped word__with__double underscores</p>
<p>escaped word<em>_with_</em>single italic underscore</p>
<p>escaped word*with*asterixs</p>
<p>escaped word**with**asterixs</p>
<p>escaped word<strong>*with*</strong>bold asterixs</p>
<p>foo<strong>bar</strong>baz</p>
<p>foo<strong>bar</strong>baz</p>
<p>this is <strong><a href="//google.com">imbued link with strong</a></strong></p>
<p>this is <strong><a href="//google.com">imbued link with strong</a></strong></p>
<p>this link has underscore <a href="http://www.google.com/some_link">some_link</a></p>
<p><strong><em>multiple</em></strong> italics and bolds with underscores in a <strong><em>paragraph</em></strong></p>
<p><strong><em>multiple</em></strong> italics and bolds with asterisks in a <strong><em>paragraph</em></strong></p>
<p><strong>multiple</strong> bolds with underscores in a <strong>paragraph</strong></p>
<p><strong>multiple</strong> bolds with asterisks in a <strong>paragraph</strong></p>
<p><em>multiple</em> italics with underscores in a <em>paragraph</em></p>
<p><em>multiple</em> italics with asterisks in a <em>paragraph</em></p>

89
node_modules/showdown/test/cases/emphasis.md generated vendored Normal file
View File

@ -0,0 +1,89 @@
*single asterisks*
_single underscores_
**double asterisks**
__double underscores__
text *with italic sentence* in middle
text __with bold sentence__ in middle
text with __bold text that
spans across multiple__ lines
underscored_word
doubleunderscore__word
asterix*word
doubleasterix**word
line with_underscored word
line with__doubleunderscored word
line with*asterixed word
line with**doubleasterixed word
some line_with_inner underscores
some line__with__inner double underscores
some line*with*inner asterixs
some line**with**inner double asterixs
another line with just _one underscore
another line with just __one double underscore
another line with just *one asterix
another line with just **one double asterix
a sentence with_underscore and another_underscore
a sentence with__doubleunderscore and another__doubleunderscore
a sentence with*asterix and another*asterix
a sentence with**doubleasterix and another**doubleasterix
escaped word\_with\_underscores
escaped word\_\_with\_\_double underscores
escaped word_\_with\__single italic underscore
escaped word\*with*asterixs
escaped word\*\*with\*\*asterixs
escaped word**\*with\***bold asterixs
foo**bar**baz
foo__bar__baz
this is **<a href="//google.com">imbued link with strong</a>**
this is __<a href="//google.com">imbued link with strong</a>__
this link has underscore [some_link](http://www.google.com/some_link)
___multiple___ italics and bolds with underscores in a ___paragraph___
***multiple*** italics and bolds with asterisks in a ***paragraph***
__multiple__ bolds with underscores in a __paragraph__
**multiple** bolds with asterisks in a **paragraph**
_multiple_ italics with underscores in a _paragraph_
_multiple_ italics with asterisks in a _paragraph_

View File

@ -0,0 +1,4 @@
<p>this is code <code>some &lt;span&gt;text&lt;/span&gt;</code> yeah!</p>
<pre><code>
&lt;div&gt;foo&lt;/div&gt;
</code></pre>

View File

@ -0,0 +1,5 @@
this is code <code>some <span>text</span></code> yeah!
<pre><code>
<div>foo</div>
</code></pre>

View File

@ -0,0 +1 @@
<p>It happened in 1986. What a great season.</p>

View File

@ -0,0 +1 @@
It happened in 1986\. What a great season.

16
node_modules/showdown/test/cases/escaping.html generated vendored Normal file
View File

@ -0,0 +1,16 @@
<p>These should all be escaped:</p>
<p>\</p>
<p>`</p>
<p>*</p>
<p>_</p>
<p>{</p>
<p>}</p>
<p>[</p>
<p>]</p>
<p>(</p>
<p>)</p>
<p>#</p>
<p>+</p>
<p>-</p>
<p>.</p>
<p>!</p>

32
node_modules/showdown/test/cases/escaping.md generated vendored Normal file
View File

@ -0,0 +1,32 @@
These should all be escaped:
\\
\`
\*
\_
\{
\}
\[
\]
\(
\)
\#
\+
\-
\.
\!

View File

@ -0,0 +1,5 @@
<pre><code>function MyFunc(a) {
// ...
}
</code></pre>
<p>That is some code!</p>

View File

@ -0,0 +1,7 @@
```
function MyFunc(a) {
// ...
}
```
That is some code!

View File

@ -0,0 +1,12 @@
<blockquote>
<p>Define a function in javascript:</p>
<pre><code>function MyFunc(a) {
var s = '`';
}
</code></pre>
<blockquote>
<p>And some nested quote</p>
<pre><code class="html language-html">&lt;div&gt;HTML!&lt;/div&gt;
</code></pre>
</blockquote>
</blockquote>

View File

@ -0,0 +1,13 @@
> Define a function in javascript:
>
> ```
> function MyFunc(a) {
> var s = '`';
> }
> ```
>
>> And some nested quote
>>
>> ```html
>> <div>HTML!</div>
>> ```

View File

@ -0,0 +1,19 @@
<p>Define a function in javascript:</p>
<pre><code>function MyFunc(a) {
var s = '`';
}
</code></pre>
<p>And some HTML</p>
<pre><code class="html language-html">&lt;div&gt;HTML!&lt;/div&gt;
</code></pre>
<p>And some CSS with spaces before the language declaration</p>
<pre><code class="css language-css">body {
font-size: 1.5em;
}
</code></pre>
<p>Use more than 3 backticks</p>
<pre><code>some code
</code></pre>
<p>Use tilde as delimiter</p>
<pre><code>another piece of code
</code></pre>

View File

@ -0,0 +1,34 @@
Define a function in javascript:
```
function MyFunc(a) {
var s = '`';
}
```
And some HTML
```html
<div>HTML!</div>
```
And some CSS with spaces before the language declaration
``` css
body {
font-size: 1.5em;
}
```
Use more than 3 backticks
`````
some code
`````
Use tilde as delimiter
~~~
another piece of code
~~~

View File

@ -0,0 +1,3 @@
<pre><code>code can go here
this is rendered on a second line
</code></pre>

View File

@ -0,0 +1,4 @@
```
code can go here
this is rendered on a second line
```

View File

@ -0,0 +1 @@
<h1 id="thisisanh1">This is an H1</h1>

View File

@ -0,0 +1 @@
# This is an H1 #

1
node_modules/showdown/test/cases/h1-with-equals.html generated vendored Normal file
View File

@ -0,0 +1 @@
<h1 id="thisisanh1">This is an H1</h1>

2
node_modules/showdown/test/cases/h1-with-equals.md generated vendored Normal file
View File

@ -0,0 +1,2 @@
This is an H1
=============

View File

@ -0,0 +1 @@
<h1 id="thisisanh1">This is an H1</h1>

View File

@ -0,0 +1 @@
# This is an H1

1
node_modules/showdown/test/cases/h2-with-dashes.html generated vendored Normal file
View File

@ -0,0 +1 @@
<h2 id="thisisanh2">This is an H2</h2>

2
node_modules/showdown/test/cases/h2-with-dashes.md generated vendored Normal file
View File

@ -0,0 +1,2 @@
This is an H2
-------------

View File

@ -0,0 +1 @@
<h2 id="thisisanh2">This is an H2</h2>

View File

@ -0,0 +1 @@
## This is an H2 ##

View File

@ -0,0 +1 @@
<h2 id="thisisanh2">This is an H2</h2>

View File

@ -0,0 +1 @@
## This is an H2

View File

@ -0,0 +1 @@
<h3 id="thisisanh3">This is an H3</h3>

View File

@ -0,0 +1 @@
### This is an H3 ###

View File

@ -0,0 +1 @@
<h3 id="thisisanh3">This is an H3</h3>

View File

@ -0,0 +1 @@
### This is an H3

View File

@ -0,0 +1 @@
<h4 id="thisisanh4">This is an H4</h4>

View File

@ -0,0 +1 @@
#### This is an H4

View File

@ -0,0 +1 @@
<h5 id="thisisanh5">This is an H5</h5>

View File

@ -0,0 +1 @@
##### This is an H5

View File

@ -0,0 +1 @@
<h6 id="thisisanh6">This is an H6</h6>

View File

@ -0,0 +1 @@
###### This is an H6

View File

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

10
node_modules/showdown/test/cases/horizontal-rules.md generated vendored Normal file
View File

@ -0,0 +1,10 @@
* * *
***
*****
- - -
---------------------------------------

10
node_modules/showdown/test/cases/html-comments.html generated vendored Normal file
View File

@ -0,0 +1,10 @@
<!-- a comment -->
<!-- a comment with *bogus* __markdown__ inside -->
<p>words <!-- a comment --> words</p>
<!-- comment -->
<p>words</p>
<!-- comment -->
<pre><code>&lt;!-- comment --&gt;
</code></pre>
<p>&lt;!----------------------------------------------------------------------------------------------------------------------------------------------------</p>
<!-------------------------------------------------------------------->

15
node_modules/showdown/test/cases/html-comments.md generated vendored Normal file
View File

@ -0,0 +1,15 @@
<!-- a comment -->
<!-- a comment with *bogus* __markdown__ inside -->
words <!-- a comment --> words
<!-- comment --> words
<!-- comment -->
<!-- comment -->
<!----------------------------------------------------------------------------------------------------------------------------------------------------
<!-------------------------------------------------------------------->

View File

@ -0,0 +1,8 @@
<ul>
<li><p>list item 1</p>
<pre><code class="html language-html">&lt;a href="www.google.com"&gt;google&lt;/a&gt;
&lt;div&gt;
&lt;div&gt;some div&lt;/div&gt;
&lt;/div&gt;
</code></pre></li>
</ul>

View File

@ -0,0 +1,8 @@
- list item 1
```html
<a href="www.google.com">google</a>
<div>
<div>some div</div>
</div>
```

View File

@ -0,0 +1,57 @@
<p>These HTML5 tags should pass through just fine.</p>
<section>hello</section>
<header>head</header>
<footer>footsies</footer>
<nav>navigation</nav>
<article>read me</article>
<aside>ignore me</aside>
<article>read
me</article>
<aside>
ignore me
</aside>
<p>the end</p>
<table class="test">
<tr>
<td>Foo</td>
</tr>
<tr>
<td>Bar</td>
</tr>
</table>
<table class="test">
<thead>
<tr>
<td>Foo</td>
</tr>
</thead>
<tr>
<td>Bar</td>
</tr>
<tfoot>
<tr>
<td>Bar</td>
</tr>
</tfoot>
</table>
<audio class="podcastplayer" controls>
<source src="foobar.mp3" type="audio/mp3" preload="none"></source>
<source src="foobar.off" type="audio/ogg" preload="none"></source>
</audio>
<video src="foo.ogg">
<track kind="subtitles" src="foo.en.vtt" srclang="en" label="English">
<track kind="subtitles" src="foo.sv.vtt" srclang="sv" label="Svenska">
</video>
<address>My street</address>
<canvas id="canvas" width="300" height="300">
Sorry, your browser doesn't support the &lt;canvas&gt; element.
</canvas>
<figure>
<img src="mypic.png" alt="An awesome picture">
<figcaption>Caption for the awesome picture</figcaption>
</figure>
<hgroup>
<h1>Main title</h1>
<h2>Secondary title</h2>
</hgroup>
<output name="result"></output>

View File

@ -0,0 +1,69 @@
These HTML5 tags should pass through just fine.
<section>hello</section>
<header>head</header>
<footer>footsies</footer>
<nav>navigation</nav>
<article>read me</article>
<aside>ignore me</aside>
<article>read
me</article>
<aside>
ignore me
</aside>
the end
<table class="test">
<tr>
<td>Foo</td>
</tr>
<tr>
<td>Bar</td>
</tr>
</table>
<table class="test">
<thead>
<tr>
<td>Foo</td>
</tr>
</thead>
<tr>
<td>Bar</td>
</tr>
<tfoot>
<tr>
<td>Bar</td>
</tr>
</tfoot>
</table>
<audio class="podcastplayer" controls>
<source src="foobar.mp3" type="audio/mp3" preload="none"></source>
<source src="foobar.off" type="audio/ogg" preload="none"></source>
</audio>
<video src="foo.ogg">
<track kind="subtitles" src="foo.en.vtt" srclang="en" label="English">
<track kind="subtitles" src="foo.sv.vtt" srclang="sv" label="Svenska">
</video>
<address>My street</address>
<canvas id="canvas" width="300" height="300">
Sorry, your browser doesn't support the &lt;canvas&gt; element.
</canvas>
<figure>
<img src="mypic.png" alt="An awesome picture">
<figcaption>Caption for the awesome picture</figcaption>
</figure>
<hgroup>
<h1>Main title</h1>
<h2>Secondary title</h2>
</hgroup>
<output name="result"></output>

View File

@ -0,0 +1,2 @@
<p><img src="./image/cat1.png" alt="image link" />(some text between brackets)</p>
<p><img src="./image/cat(1).png" alt="image link" />(some text between brackets)</p>

View File

@ -0,0 +1,3 @@
![image link](<./image/cat1.png>)(some text between brackets)
![image link](<./image/cat(1).png>)(some text between brackets)

6
node_modules/showdown/test/cases/images.html generated vendored Normal file
View File

@ -0,0 +1,6 @@
<p><img src="/path/to/img.jpg" alt="Alt text" /></p>
<p><img src="/path/to/img.jpg" alt="Alt text" title="Optional title" /></p>
<p><img src="url/to/image.jpg" alt="Alt text" title="Optional title attribute" /></p>
<p><img src="url/to/image2.jpg" alt="My Image" title="Optional title attribute" /></p>
<p>![leave me alone]</p>
<p>![leave me alone][]</p>

15
node_modules/showdown/test/cases/images.md generated vendored Normal file
View File

@ -0,0 +1,15 @@
![Alt text](/path/to/img.jpg)
![Alt text](/path/to/img.jpg "Optional title")
![Alt text][id]
![My Image]
![leave me alone]
![leave me alone][]
[id]: url/to/image.jpg "Optional title attribute"
[My Image]: url/to/image2.jpg "Optional title attribute"

View File

@ -0,0 +1,2 @@
<p>Search the web at <a href="http://google.com/">Google</a> or <a href="http://daringfireball.net/">Daring Fireball</a>.</p>
<p>Search the web at <a href="http://google.com/">Google</a> or <a href="http://daringfireball.net/">Daring Fireball</a>.</p>

8
node_modules/showdown/test/cases/implicit-anchors.md generated vendored Normal file
View File

@ -0,0 +1,8 @@
Search the web at [Google][] or [Daring Fireball][].
Search the web at [Google] or [Daring Fireball].
[Google]: http://google.com/
[Daring Fireball]: http://daringfireball.net/

2
node_modules/showdown/test/cases/inline-anchors.html generated vendored Normal file
View File

@ -0,0 +1,2 @@
<p>This is <a href="http://example.com/" title="Title">an example</a> inline link.</p>
<p><a href="http://example.net/">This link</a> has no title attribute.</p>

4
node_modules/showdown/test/cases/inline-anchors.md generated vendored Normal file
View File

@ -0,0 +1,4 @@
This is [an example](http://example.com/ "Title") inline link.
[This link](http://example.net/) has no title attribute.

7
node_modules/showdown/test/cases/inline-code.html generated vendored Normal file
View File

@ -0,0 +1,7 @@
<p>Create a new <code>function</code>.</p>
<p>Use the backtick in MySQL syntax <code>SELECT `column` FROM whatever</code>.</p>
<p>A single backtick in a code span: <code>`</code></p>
<p>A backtick-delimited string in a code span: <code>`foo`</code></p>
<p>Please don't use any <code>&lt;blink&gt;</code> tags.</p>
<p><code>&amp;#8212;</code> is the decimal-encoded equivalent of <code>&amp;mdash;</code>.</p>
<p>this <code>inline **code** has ___magic___</code> chars</p>

14
node_modules/showdown/test/cases/inline-code.md generated vendored Normal file
View File

@ -0,0 +1,14 @@
Create a new `function`.
Use the backtick in MySQL syntax ``SELECT `column` FROM whatever``.
A single backtick in a code span: `` ` ``
A backtick-delimited string in a code span: `` `foo` ``
Please don't use any `<blink>` tags.
`&#8212;` is the decimal-encoded equivalent of `&mdash;`.
this `inline **code** has ___magic___` chars

View File

@ -0,0 +1,2 @@
<p>Hello.this_is_a_variable
and.this.is.another_one</p>

View File

@ -0,0 +1,3 @@
Hello.this\_is\_a\_variable
and.this.is.another_one

View File

@ -0,0 +1,4 @@
<style>
p { line-height: 20px; }
</style>
<p>An exciting sentence.</p>

6
node_modules/showdown/test/cases/inline-style-tag.md generated vendored Normal file
View File

@ -0,0 +1,6 @@
<style>
p { line-height: 20px; }
</style>
An exciting sentence.

View File

@ -0,0 +1,4 @@
<blockquote>
<p>This is a multi line blockquote test</p>
<p>With more than one line.</p>
</blockquote>

4
node_modules/showdown/test/cases/lazy-blockquote.md generated vendored Normal file
View File

@ -0,0 +1,4 @@
> This is a multi line blockquote test
> With more than one line.

View File

@ -0,0 +1,2 @@
<p><a href="foo">some text</a> words</p>
<p><br> words</p>

View File

@ -0,0 +1,3 @@
<a href="foo">some text</a> words
<br> words

View File

@ -0,0 +1,12 @@
<h1 id="sometitle">some title</h1>
<ol>
<li>list item 1</li>
<li>list item 2</li>
</ol>
<blockquote>
<p>some text in a blockquote</p>
</blockquote>
<ul>
<li>another list item 1</li>
<li>another list item 2</li>
</ul>

View File

@ -0,0 +1,9 @@
# some title
1. list item 1
2. list item 2
> some text in a blockquote
* another list item 1
* another list item 2

View File

@ -0,0 +1,13 @@
<h1 id="sometitle">some title</h1>
<ol>
<li>list item 1</li>
<li>list item 2</li>
</ol>
<pre><code>some code
and some other line of code
</code></pre>
<ul>
<li>another list item 1</li>
<li>another list item 2</li>
</ul>

View File

@ -0,0 +1,13 @@
# some title
1. list item 1
2. list item 2
```
some code
and some other line of code
```
* another list item 1
* another list item 2

View File

@ -0,0 +1,7 @@
<ul>
<li><p>A list item with a blockquote:</p>
<blockquote>
<p>This is a blockquote
inside a list item.</p>
</blockquote></li>
</ul>

View File

@ -0,0 +1,4 @@
* A list item with a blockquote:
> This is a blockquote
> inside a list item.

5
node_modules/showdown/test/cases/list-with-code.html generated vendored Normal file
View File

@ -0,0 +1,5 @@
<ul>
<li><p>A list item with code:</p>
<pre><code>alert('Hello world!');
</code></pre></li>
</ul>

Some files were not shown because too many files have changed in this diff Show More