mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
fix(double linebreaks): fix double linebreaks in html output
Closes #291
This commit is contained in:
parent
fe64a1715d
commit
f97e072bc4
BIN
dist/showdown.js
vendored
BIN
dist/showdown.js
vendored
Binary file not shown.
BIN
dist/showdown.js.map
vendored
BIN
dist/showdown.js.map
vendored
Binary file not shown.
BIN
dist/showdown.min.js
vendored
BIN
dist/showdown.min.js
vendored
Binary file not shown.
BIN
dist/showdown.min.js.map
vendored
BIN
dist/showdown.min.js.map
vendored
Binary file not shown.
|
@ -112,7 +112,7 @@ showdown.subParser('lists', function (text, options, globals) {
|
|||
var pos = txt.search(counterRxg);
|
||||
if (pos !== -1) {
|
||||
// slice
|
||||
result += '\n\n<' + listType + '>' + processListItems(txt.slice(0, pos), !!trimTrailing) + '</' + listType + '>\n\n';
|
||||
result += '\n<' + listType + '>' + processListItems(txt.slice(0, pos), !!trimTrailing) + '</' + listType + '>\n';
|
||||
|
||||
// invert counterType and listType
|
||||
listType = (listType === 'ul') ? 'ol' : 'ul';
|
||||
|
@ -121,14 +121,14 @@ showdown.subParser('lists', function (text, options, globals) {
|
|||
//recurse
|
||||
parseCL(txt.slice(pos));
|
||||
} else {
|
||||
result += '\n\n<' + listType + '>' + processListItems(txt, !!trimTrailing) + '</' + listType + '>\n\n';
|
||||
result += '\n<' + listType + '>' + processListItems(txt, !!trimTrailing) + '</' + listType + '>\n';
|
||||
}
|
||||
})(list);
|
||||
for (var i = 0; i < subLists.length; ++i) {
|
||||
|
||||
}
|
||||
} else {
|
||||
result = '\n\n<' + listType + '>' + processListItems(list, !!trimTrailing) + '</' + listType + '>\n\n';
|
||||
result = '\n<' + listType + '>' + processListItems(list, !!trimTrailing) + '</' + listType + '>\n';
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
@ -58,7 +58,7 @@ showdown.subParser('paragraphs', function (text, options, globals) {
|
|||
}
|
||||
grafsOut[i] = grafsOutIt;
|
||||
}
|
||||
text = grafsOut.join('\n\n');
|
||||
text = grafsOut.join('\n');
|
||||
// Strip leading and trailing lines:
|
||||
text = text.replace(/^\n+/g, '');
|
||||
text = text.replace(/\n+$/g, '');
|
||||
|
|
|
@ -2,12 +2,9 @@
|
|||
<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>
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
<pre><code>> this is a pseudo blockquote
|
||||
> inside a code block
|
||||
</code></pre>
|
||||
|
||||
<p>foo</p>
|
||||
|
||||
<pre><code>> this is another bq
|
||||
inside code
|
||||
</code></pre>
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
<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>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<blockquote>
|
||||
<p>This is a multi line blockquote test</p>
|
||||
|
||||
<p>With more than one line.</p>
|
||||
</blockquote>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<p>This is some HTML:</p>
|
||||
|
||||
<pre><code><h1>Heading</h1>
|
||||
</code></pre>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<p>This is a normal paragraph:</p>
|
||||
|
||||
<pre><code>This is a code block.
|
||||
</code></pre>
|
||||
|
|
|
@ -1,66 +1,34 @@
|
|||
<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>
|
||||
|
|
|
@ -1,31 +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>
|
||||
|
|
|
@ -2,5 +2,4 @@
|
|||
// ...
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<p>That is some code!</p>
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
<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"><div>HTML!</div>
|
||||
</code></pre>
|
||||
</blockquote>
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
<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"><div>HTML!</div>
|
||||
</code></pre>
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
<hr />
|
||||
|
||||
<hr />
|
||||
|
||||
<hr />
|
||||
|
||||
<hr />
|
||||
|
||||
<hr />
|
||||
|
|
|
@ -1,14 +1,8 @@
|
|||
<!-- a comment -->
|
||||
|
||||
<!-- a comment with *bogus* __markdown__ inside -->
|
||||
|
||||
<p>words <!-- a comment --> words</p>
|
||||
|
||||
<!-- comment -->
|
||||
|
||||
<p>words</p>
|
||||
|
||||
<!-- comment -->
|
||||
|
||||
<pre><code><!-- comment -->
|
||||
</code></pre>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<ul>
|
||||
<li><p>list item 1</p>
|
||||
|
||||
<pre><code class="html language-html"><a href="www.google.com">google</a>
|
||||
<div>
|
||||
<div>some div</div>
|
||||
|
|
|
@ -1,26 +1,16 @@
|
|||
<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>
|
||||
|
@ -29,7 +19,6 @@
|
|||
<td>Bar</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="test">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -45,31 +34,24 @@
|
|||
</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 <canvas> 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>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
<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" alt="Alt text" title="Optional title attribute" /></p>
|
||||
|
|
|
@ -1,3 +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>
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
<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><blink></code> tags.</p>
|
||||
|
||||
<p><code>&#8212;</code> is the decimal-encoded equivalent of <code>&mdash;</code>.</p>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<style>
|
||||
p { line-height: 20px; }
|
||||
</style>
|
||||
|
||||
<p>An exciting sentence.</p>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<blockquote>
|
||||
<p>This is a multi line blockquote test</p>
|
||||
|
||||
<p>With more than one line.</p>
|
||||
</blockquote>
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
<p><a href="foo">some text</a> words</p>
|
||||
|
||||
<p><br> words</p>
|
||||
|
|
|
@ -1,15 +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>
|
||||
|
||||
|
|
|
@ -1,16 +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>
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<ul>
|
||||
<li><p>A list item with a blockquote:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>This is a blockquote
|
||||
inside a list item.</p>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<ul>
|
||||
<li><p>A list item with code:</p>
|
||||
|
||||
<pre><code>alert('Hello world!');
|
||||
</code></pre></li>
|
||||
</ul>
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
<p><code>some **code** yeah</code></p>
|
||||
|
||||
<p>some <code>inline **code** block</code></p>
|
||||
|
||||
<p><code>some inline **code**</code> block</p>
|
||||
|
||||
<p>yo dawg <code start="true">some <code start="false">code</code> inception</code></p>
|
||||
|
||||
<div>some **div** yeah</div>
|
|
@ -1,6 +1,5 @@
|
|||
<ol>
|
||||
<li><p>This is a major bullet point.</p>
|
||||
|
||||
<p>That contains multiple paragraphs.</p></li>
|
||||
|
||||
<li><p>And another line</p></li>
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
<blockquote>
|
||||
<p>This is a multi line blockquote test</p>
|
||||
|
||||
<blockquote>
|
||||
<p>And nesting!</p>
|
||||
</blockquote>
|
||||
|
||||
<p>With more than one line.</p>
|
||||
</blockquote>
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
<ul>
|
||||
<li><p>foo</p>
|
||||
|
||||
<ul>
|
||||
<li><p>bazinga</p></li>
|
||||
|
||||
<li><p>yeah</p></li></ul></li>
|
||||
|
||||
<li><p>bar</p>
|
||||
|
||||
<ol>
|
||||
<li><p>damn</p></li>
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<p>code inception</p>
|
||||
|
||||
<pre><code><pre><code>
|
||||
<div>some html code inside code html tags inside a fenced code block</div>
|
||||
</code></pre>
|
||||
</code></pre>
|
||||
|
||||
|
|
|
@ -3,14 +3,11 @@
|
|||
foobar
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
<p>blabla</p>
|
||||
|
||||
<pre nhaca="zulu"><code bla="bla">
|
||||
foobar
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
<pre><code>
|
||||
<div>some html code</div>
|
||||
</code></pre>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
<h1 id="sametitle">Same Title</h1>
|
||||
|
||||
<p>some text</p>
|
||||
|
||||
<h1 id="sametitle-1">Same Title</h1>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
<p><strong>important</strong></p>
|
||||
|
||||
<p><strong>important</strong></p>
|
||||
|
||||
<p>really <strong>freaking</strong>strong</p>
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
<p><img src="./pic/pic1_50.png" alt="my image" width="100px" height="20px" /></p>
|
||||
|
||||
<p><img src="./pic/pic1_50.png" alt="my image2" width="100px" height="20px" /></p>
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
<p>foo.bar</p>
|
||||
|
||||
<p>www.foobar</p>
|
||||
|
||||
<p><a href="http://www.foobar.com">www.foobar.com</a></p>
|
||||
|
||||
<p><a href="http://foobar.com">http://foobar.com</a></p>
|
||||
|
||||
<p><a href="https://www.foobar.com/baz?bazinga=nhecos;">https://www.foobar.com/baz?bazinga=nhecos;</a></p>
|
||||
|
||||
<p><a href="http://www.google.com/">http://www.google.com</a></p>
|
||||
|
|
|
@ -1,18 +1,10 @@
|
|||
<p>this is a sentence_with_mid underscores</p>
|
||||
|
||||
<p>this is a sentence with just_one underscore</p>
|
||||
|
||||
<p>this <em>should be parsed</em> as emphasis</p>
|
||||
|
||||
<p>this is double__underscore__mid word</p>
|
||||
|
||||
<p>this has just__one double underscore</p>
|
||||
|
||||
<p>this <strong>should be parsed</strong> as bold</p>
|
||||
|
||||
<p>emphasis at <em>end of sentence</em></p>
|
||||
|
||||
<p><em>emphasis at</em> line start</p>
|
||||
|
||||
<p>multi <em>line emphasis
|
||||
yeah it is</em> yeah</p>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
<p>a <del>strikethrough</del> word</p>
|
||||
|
||||
<p>this should~~not be parsed</p>
|
||||
|
||||
<p><del>strike-through text</del></p>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<h1 id="mythings">my things</h1>
|
||||
|
||||
<ul>
|
||||
<li>foo</li>
|
||||
|
||||
|
@ -9,5 +8,4 @@
|
|||
|
||||
<li class="task-list-item" style="list-style-type: none;"><input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;" checked> bazinga</li>
|
||||
</ul>
|
||||
|
||||
<p>otherthings</p>
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
<h1 id="somemarkdown">some markdown</h1>
|
||||
|
||||
<p>blabla</p>
|
||||
|
||||
<div>This is **not parsed**</div>
|
||||
|
||||
<div markdown="1"><p>This is <strong>parsed</strong></p></div>
|
||||
|
||||
<div>This is **not parsed**</div>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
<p>pointer *ptr *thing</p>
|
||||
|
||||
<p>something _else _bla</p>
|
||||
|
||||
<p>something __else __bla</p>
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
<p><a href="http://website.com/img@x2.jpg">http://website.com/img@x2.jpg</a></p>
|
||||
|
||||
<p><a href="http://website.com/img-x2.jpg">http://website.com/img-x2.jpg</a></p>
|
||||
|
||||
<p><a href="http://website.com/img@x2">http://website.com/img@x2</a></p>
|
||||
|
||||
<p><a href="http://website.com/img@.jpg">http://website.com/img@.jpg</a></p>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<h2 id="markdowndoc">markdown doc</h2>
|
||||
|
||||
<p>you can use markdown for card documentation</p>
|
||||
|
||||
<ul>
|
||||
<li>foo</li>
|
||||
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
<p>this is a link to <a href="http://www.github.com">www.github.com</a></p>
|
||||
|
||||
<p>this is a link to <a href="http://www.google.com">www.google.com</a></p>
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
<h3 id="given">Given</h3>
|
||||
|
||||
<h3 id="when">When</h3>
|
||||
|
||||
<h3 id="then">Then</h3>
|
||||
|
||||
<h3 id="foo">foo</h3>
|
||||
|
||||
<h4 id="bar">bar</h4>
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
<p>this is some text</p>
|
||||
|
||||
<p><code>php
|
||||
function thisThing() {
|
||||
echo "some weird formatted code!";
|
||||
}
|
||||
</code></p>
|
||||
|
||||
<p>some other text</p>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<h1 id="tabletest">Table Test</h1>
|
||||
|
||||
<h2 id="section1">section 1</h2>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -18,9 +16,7 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h2 id="section2">section 2</h2>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<p>some text</p>
|
||||
|
||||
<pre><code>| Tables | Are | Cool |
|
||||
| ------------- |:-------------:| -----:|
|
||||
| **col 3 is** | right-aligned | $1600 |
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
<h3 id="stats">Stats</h3>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent nisi est,
|
||||
ullamcorper euismod iaculis sed, tristique at neque. Nullam metus risus,
|
||||
malesuada vitae imperdiet ac, tincidunt eget lacus. Proin ullamcorper
|
||||
vulputate dictum. Vestibulum consequat ultricies nibh, sed tempus nisl mattis a.</p>
|
||||
|
||||
vulputate dictum. Vestibulum consequat ultricies nibh, sed tempus nisl mattis a.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -21,7 +20,6 @@ vulputate dictum. Vestibulum consequat ultricies nibh, sed tempus nisl mattis a.
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>Phasellus ac porttitor quam. Integer cursus accumsan mauris nec interdum.
|
||||
Etiam iaculis urna vitae risus facilisis faucibus eu quis risus. Sed aliquet
|
||||
rutrum dictum. Vivamus pulvinar malesuada ultricies. Pellentesque in commodo
|
||||
|
|
|
@ -1,29 +1,20 @@
|
|||
<h3 id="automaticlinks">Automatic Links</h3>
|
||||
|
||||
<pre><code>https://ghost.org
|
||||
</code></pre>
|
||||
|
||||
<p><a href="https://ghost.org">https://ghost.org</a></p>
|
||||
|
||||
<h3 id="markdownfootnotes">Markdown Footnotes</h3>
|
||||
|
||||
<pre><code>The quick brown fox[^1] jumped over the lazy dog[^2].
|
||||
|
||||
[^1]: Foxes are red
|
||||
[^2]: Dogs are usually not red
|
||||
</code></pre>
|
||||
|
||||
<p>The quick brown fox[^1] jumped over the lazy dog[^2].</p>
|
||||
|
||||
<h3 id="syntaxhighlighting">Syntax Highlighting</h3>
|
||||
|
||||
<pre><code>```language-javascript
|
||||
[...]
|
||||
```
|
||||
</code></pre>
|
||||
|
||||
<p>Combined with <a href="http://prismjs.com/">Prism.js</a> in the Ghost theme:</p>
|
||||
|
||||
<pre><code class="language-javascript language-language-javascript">// # Notifications API
|
||||
// RESTful API for creating notifications
|
||||
var Promise = require('bluebird'),
|
||||
|
|
|
@ -1,80 +1,48 @@
|
|||
<p>foo_bar_baz foo_bar_baz_bar_foo <em>foo_bar baz_bar</em> baz_foo</p>
|
||||
|
||||
<p><em>baz_bar_foo</em></p>
|
||||
|
||||
<p><strong>baz_bar_foo</strong></p>
|
||||
|
||||
<p><strong><em>baz_bar_foo</em></strong></p>
|
||||
|
||||
<p>baz bar foo <em>baz_bar_foo foo bar baz</em> and foo</p>
|
||||
|
||||
<p>foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo</p>
|
||||
|
||||
<p><code>foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo</code></p>
|
||||
|
||||
<pre><code>foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo
|
||||
</code></pre>
|
||||
|
||||
<pre><code class="html language-html">foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo
|
||||
</code></pre>
|
||||
|
||||
<pre>foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo</pre>
|
||||
|
||||
<pre><code class="language-html">foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo</code></pre>
|
||||
|
||||
<pre class="lang-html"><code class="language-html">foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo</code></pre>
|
||||
|
||||
<script>
|
||||
var strike = "foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo";
|
||||
var foo_bar_baz_bar_foo = "foo_bar_";
|
||||
</script>
|
||||
|
||||
<p><a href="http://myurl.com/foo_bar_baz_bar_foo">foo_bar_baz foo_bar_baz_bar_foo <em>foo_bar baz_bar</em> baz_foo</a></p>
|
||||
|
||||
<p><a href="http://myurl.com/foo_bar_baz_bar_foo" title="foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo">foo_bar_baz foo_bar_baz_bar_foo <em>foo_bar baz_bar</em> baz_foo</a></p>
|
||||
|
||||
<p><img src="http://myurl.com/foo_bar_baz_bar_foo" alt="foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo"></p>
|
||||
|
||||
<h2 id="foo_bar_bazfoo_bar_baz_bar_foo_foo_barbaz_bar_baz_foo">foo_bar_baz foo_bar_baz_bar_foo <em>foo_bar baz_bar</em> baz_foo</h2>
|
||||
|
||||
<h3 id="foo_bar_bazfoo_bar_baz_bar_foo_foo_barbaz_bar_baz_foo-1">foo_bar_baz foo_bar_baz_bar_foo <em>foo_bar baz_bar</em> baz_foo</h3>
|
||||
|
||||
<ol>
|
||||
<li>foo_bar_baz foo_bar_baz_bar_foo <em>foo_bar baz_bar</em> baz_foo</li>
|
||||
|
||||
<li>foo_bar_baz foo_bar_baz_bar_foo <em>foo_bar baz_bar</em> baz_foo</li>
|
||||
</ol>
|
||||
|
||||
<blockquote>
|
||||
<p>blockquote foo_bar_baz foo_bar_baz_bar_foo <em>foo_bar baz_bar</em> baz_foo</p>
|
||||
</blockquote>
|
||||
|
||||
<ul>
|
||||
<li>foo_bar_baz foo_bar_baz_bar_foo <em>foo_bar baz_bar</em> baz_foo</li>
|
||||
|
||||
<li>foo_bar_baz foo_bar_baz_bar_foo <em>foo_bar baz_bar</em> baz_foo</li>
|
||||
</ul>
|
||||
|
||||
<hr />
|
||||
|
||||
<p><a href="http://en.wikipedia.org/wiki/Tourism_in_Germany">http://en.wikipedia.org/wiki/Tourism_in_Germany</a></p>
|
||||
|
||||
<p><a href="http://en.wikipedia.org/wiki/Tourism_in_Germany">an example</a></p>
|
||||
|
||||
<p>Another <a href="http://en.wikipedia.org/wiki/Tourism_in_Germany">example</a> of a link</p>
|
||||
|
||||
<p><code>foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo</code></p>
|
||||
|
||||
<!-- These two cases still have bad <ems> because showdown handles them incorrectly -->
|
||||
|
||||
<p><code>foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo</code></p>
|
||||
|
||||
<p><img src="http://myurl.com/foo_bar_baz_bar_foo" alt="foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo" /></p>
|
||||
|
||||
<p><a href="http://myurl.com/foo_bar_baz_bar_foo">http://myurl.com/foo_bar_baz_bar_foo</a></p>
|
||||
|
||||
<p><a href="http://myurl.com/foo_bar_baz_bar_foo">http://myurl.com/foo_bar_baz_bar_foo</a></p>
|
||||
|
||||
<p><em>italics</em>.</p>
|
||||
|
||||
<p><em>italics</em> .</p>
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
<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>
|
||||
|
|
|
@ -3,13 +3,11 @@
|
|||
|
||||
<li>Item 2</li>
|
||||
</ul>
|
||||
|
||||
<ol>
|
||||
<li>Item 1</li>
|
||||
|
||||
<li>Item 2</li>
|
||||
</ol>
|
||||
|
||||
<ul>
|
||||
<li>Item 1</li>
|
||||
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
<ol>
|
||||
<li><p>Hi, I am a thing</p>
|
||||
|
||||
<pre><code class="sh language-sh">$ git clone thing.git
|
||||
|
||||
dfgdfg
|
||||
</code></pre></li>
|
||||
|
||||
<li><p>I am another thing!</p>
|
||||
|
||||
<pre><code class="sh language-sh">$ git clone other-thing.git
|
||||
|
||||
foobar
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<blockquote>
|
||||
<p>a blockquote</p>
|
||||
|
||||
<h1 id="followedbyanheading">followed by an heading</h1>
|
||||
</blockquote>
|
|
@ -1,28 +1,21 @@
|
|||
<p>Test pre in a list</p>
|
||||
|
||||
<ul>
|
||||
<li>& <</li>
|
||||
|
||||
<li><code>& <</code>
|
||||
|
||||
|
||||
<ul>
|
||||
<li>& <</li>
|
||||
|
||||
<li><code>& <</code>
|
||||
|
||||
|
||||
<ul>
|
||||
<li>& <</li>
|
||||
|
||||
<li><code>& <</code>
|
||||
|
||||
|
||||
<ul>
|
||||
<li>& <</li>
|
||||
|
||||
<li><code>& <</code></li></ul>
|
||||
</li></ul>
|
||||
</li></ul>
|
||||
</li>
|
||||
<li><code>& <</code></li></ul></li></ul></li></ul></li>
|
||||
</ul>
|
|
@ -1,8 +1,5 @@
|
|||
<h2 id="title1">Title 1</h2>
|
||||
|
||||
<div></div>
|
||||
|
||||
<h1 id="title2">Title 2</h1>
|
||||
|
||||
<div>
|
||||
</div>
|
||||
|
|
|
@ -8,11 +8,8 @@ alert(s);
|
|||
|
||||
bar
|
||||
</code></pre>
|
||||
|
||||
<p>this is a long paragraph</p>
|
||||
|
||||
<p>this is another long paragraph</p>
|
||||
|
||||
<pre lang="no-highlight"><code>```javascript
|
||||
var s = "JavaScript syntax highlighting";
|
||||
alert(s);
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
var s;
|
||||
```
|
||||
</code></pre>
|
||||
|
||||
<p>this is a long paragraph</p>
|
||||
|
||||
<pre lang="no-highlight"><code>
|
||||
```javascript
|
||||
var s;
|
||||
|
|
|
@ -1,17 +1,9 @@
|
|||
<p><img src="https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png" alt="sd-inline" /> <a href="https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png">sd-ref</a></p>
|
||||
|
||||
<p>foo</p>
|
||||
|
||||
<p><a href="https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png">sd-inline</a> <img src="https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png" alt="sd-ref" /></p>
|
||||
|
||||
<p>foo</p>
|
||||
|
||||
<p><img src="https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png" alt="sd-ref" /> <a href="https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png">sd-inline</a></p>
|
||||
|
||||
<p>foo</p>
|
||||
|
||||
<p><a href="https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png">sd-ref</a> <img src="https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png" alt="sd-inline" /></p>
|
||||
|
||||
<p>foo</p>
|
||||
|
||||
<p><a href="http://www.google.com/"><img src="https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png" alt="sd-ref" /></a></p>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
<p><img src="https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png" alt="sd-inline" /> <img src="https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png" alt="sd-ref" /></p>
|
||||
|
||||
<p>foo</p>
|
||||
|
||||
<p><img src="https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png" alt="sd-ref" /> <img src="https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png" alt="sd-inline" /></p>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
<p><a href="https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png">sd-inline</a> <a href="https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png">sd-ref</a></p>
|
||||
|
||||
<p>foo</p>
|
||||
|
||||
<p><a href="https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png">sd-ref</a> <a href="https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png">sd-inline</a></p>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<ul>
|
||||
<li><p>list item 1</p>
|
||||
|
||||
<pre><code><parent>
|
||||
<child>child1</child>
|
||||
<!-- This is a comment -->
|
||||
|
@ -11,7 +10,6 @@
|
|||
|
||||
<li><p>list item 2</p></li>
|
||||
</ul>
|
||||
|
||||
<pre><code><parent>
|
||||
<child>child1</child>
|
||||
<!-- This is a comment -->
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
<p>plain text link http://test.com/this_has/one.html with underscores</p>
|
||||
|
||||
<p>legit·word_with·1·underscore</p>
|
||||
|
||||
<p>a word<em>with</em>2underscores (gets em)</p>
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
<p>this is a underscore_test <img src="http://myserver.com/my_kitty.jpg" alt="my cat" /></p>
|
||||
|
||||
<p>another <img src="http://myserver.com/my_kitty.jpg" alt="my cat" /> underscore_test bla</p>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<p>This is a first paragraph,
|
||||
on multiple lines.</p>
|
||||
|
||||
<p>This is a second paragraph.
|
||||
There are spaces in between the two.</p>
|
|
@ -1,5 +1,4 @@
|
|||
<p>This is a first paragraph,
|
||||
on multiple lines.</p>
|
||||
|
||||
<p>This is a second paragraph
|
||||
which has multiple lines too.</p>
|
|
@ -1,3 +1,2 @@
|
|||
<p>A first paragraph.</p>
|
||||
|
||||
<p>A second paragraph after 3 CR (carriage return).</p>
|
|
@ -1,3 +1,2 @@
|
|||
<p>This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line.</p>
|
||||
|
||||
<p>A few spaces and a new long long long long long long long long long long long long long long long long paragraph on 1 line.</p>
|
|
@ -1,3 +1,2 @@
|
|||
<p>This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line.</p>
|
||||
|
||||
<p>1 tab to separate them and a new long long long long long long long long long long long long long long long long paragraph on 1 line.</p>
|
|
@ -1,3 +1,2 @@
|
|||
<p>This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line.</p>
|
||||
|
||||
<p>A new long long long long long long long long long long long long long long long long paragraph on 1 line.</p>
|
|
@ -1,5 +1,3 @@
|
|||
<p>These lines all end with end of line (EOL) sequences.</p>
|
||||
|
||||
<p>Seriously, they really do.</p>
|
||||
|
||||
<p>If you don't believe me: HEX EDIT!</p>
|
|
@ -1 +1 @@
|
|||
<p>These lines all end with end of line (EOL) sequences.</p>
<p>Seriously, they really do.</p>
<p>If you don't believe me: HEX EDIT!</p>
|
||||
<p>These lines all end with end of line (EOL) sequences.</p>
<p>Seriously, they really do.</p>
<p>If you don't believe me: HEX EDIT!</p>
|
|
@ -1,5 +1,3 @@
|
|||
<p>These lines all end with end of line (EOL) sequences.</p>
|
||||
|
||||
<p>Seriously, they really do.</p>
|
||||
|
||||
<p>If you don't believe me: HEX EDIT!</p>
|
|
@ -1,5 +1,4 @@
|
|||
<blockquote>
|
||||
<h1>heading level 1</h1>
|
||||
|
||||
<p>paragraph</p>
|
||||
</blockquote>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<blockquote>
|
||||
<p>A blockquote with a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long line.</p>
|
||||
|
||||
<p>and a second very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long line.</p>
|
||||
</blockquote>
|
|
@ -2,7 +2,6 @@
|
|||
<p>A blockquote
|
||||
on multiple lines
|
||||
like this.</p>
|
||||
|
||||
<p>But it has
|
||||
two paragraphs.</p>
|
||||
</blockquote>
|
|
@ -1,9 +1,7 @@
|
|||
<blockquote>
|
||||
<p>This is the first level of quoting.</p>
|
||||
|
||||
<blockquote>
|
||||
<p>This is nested blockquote.</p>
|
||||
</blockquote>
|
||||
|
||||
<p>Back to the first level.</p>
|
||||
</blockquote>
|
|
@ -1,6 +1,5 @@
|
|||
<blockquote>
|
||||
<p>This is the first level of quoting.</p>
|
||||
|
||||
<blockquote>
|
||||
<p>This is nested blockquote.</p>
|
||||
</blockquote>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<blockquote>
|
||||
<p>This is the first level of quoting.</p>
|
||||
|
||||
<blockquote>
|
||||
<p>This is nested blockquote.
|
||||
Back to the first level.</p>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<blockquote>
|
||||
<p>This is the first level of quoting.</p>
|
||||
|
||||
<blockquote>
|
||||
<p>This is nested blockquote.</p>
|
||||
</blockquote>
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
<h1>this is an h1 with two trailing spaces</h1>
|
||||
|
||||
<p>A new paragraph.</p>
|
|
@ -1,6 +1,5 @@
|
|||
<ul>
|
||||
<li><p>a list containing a blockquote</p>
|
||||
|
||||
<blockquote>
|
||||
<p>this the blockquote in the list</p>
|
||||
</blockquote></li>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<ul>
|
||||
<li><p>a list containing a block of code</p>
|
||||
|
||||
<pre><code>10 PRINT HELLO INFINITE
|
||||
20 GOTO 10
|
||||
</code></pre></li>
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<li><p>This is a list item with two paragraphs. Lorem ipsum dolor
|
||||
sit amet, consectetuer adipiscing elit. Aliquam hendrerit
|
||||
mi posuere lectus.</p>
|
||||
|
||||
<p>Vestibulum enim wisi, viverra nec, fringilla in, laoreet
|
||||
vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
|
||||
sit amet velit.</p></li>
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<li><p>This is a list item with two paragraphs. Lorem ipsum dolor
|
||||
sit amet, consectetuer adipiscing elit. Aliquam hendrerit
|
||||
mi posuere lectus.</p>
|
||||
|
||||
<p>Vestibulum enim wisi, viverra nec, fringilla in, laoreet
|
||||
vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
|
||||
sit amet velit.</p></li>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<ol>
|
||||
<li><p>1</p>
|
||||
|
||||
<ul>
|
||||
<li>inner par list</li></ul></li>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user