Update Markdown formatter to support footnotes and hard wraps natively

This commit is contained in:
Kijin Sung 2017-06-29 23:58:20 +09:00
parent cbd324c35b
commit 464325c6f6
9 changed files with 106 additions and 19 deletions

View file

@ -1,7 +1,7 @@
This is a Markdown document. These lines belong in the same paragraph. Markdown usually ignores single line breaks.
This is a [link](foobar.html "title").
This is an ![alt](foobar.jpg "image").
This is an ![alt](foobar.jpg "image").
- This is a list.
- It has two items.

View file

@ -2,16 +2,16 @@
These lines belong in the same paragraph.<br />
Markdown usually ignores single line breaks.</p>
<pre><code>This is an indented code segment.
<pre><code>This is an indented code segment.
All Markdown variants will recognize it.
</code></pre>
<p><code>This is a fenced code segment.
<p><code>This is a fenced code segment.
Only Markdown Extra will recognize it.</code></p>
<p>This is a <a href="foobar.html">link</a>.<br />
This is an <img src="foobar.jpg" alt="image" />.</p>
<ul><li>This is a list. </li>
<li>It has two items. </li>
<ul><li>This is a list.</li>
<li>It has two items.</li>
</ul>

View file

@ -2,17 +2,17 @@
These lines belong in the same paragraph.<br />
Markdown usually ignores single line breaks.</p>
<pre><code>This is an indented code segment.
<pre><code>This is an indented code segment.
All Markdown variants will recognize it.
</code></pre>
<pre><code>This is a fenced code segment.
Only Markdown Extra will recognize it.
<pre><code>This is a fenced code segment.
Only Markdown Extra will recognize it.
</code></pre>
<p>This is a <a href="foobar.html">link</a>.<br />
This is an <img src="foobar.jpg" alt="image" />.</p>
<ul><li>This is a list. </li>
<li>It has two items. </li>
<ul><li>This is a list.</li>
<li>It has two items.</li>
</ul>

View file

@ -0,0 +1,18 @@
<p>This is a Markdown document.
These lines belong in the same paragraph.
Markdown usually ignores single line breaks.</p>
<pre><code>This is an indented code segment.
All Markdown variants will recognize it.
</code></pre>
<pre><code>This is a fenced code segment.
Only Markdown Extra will recognize it.
</code></pre>
<p>This is a <a href="foobar.html">link</a>.
This is an <img src="foobar.jpg" alt="image" />.</p>
<ul><li>This is a list.</li>
<li>It has two items.</li>
</ul>

View file

@ -0,0 +1,16 @@
<div markdown="1">
This is *true* markdown text.
</div>
This sentence has a footnote. [^1]
[^1]: Here's the footnote content.
```
fenced code block
```
Hello | World
----- | ------
Foo | Bar
Baz | Rhymix

View file

@ -0,0 +1,14 @@
<div>
This is *true* markdown text.
</div>
<p>This sentence has a footnote. [^1]</p>
<p>[^1]: Here's the footnote content.</p>
<p><code>fenced code block</code></p>
<p>Hello | World
----- | ------
Foo | Bar
Baz | Rhymix</p>

View file

@ -0,0 +1,24 @@
<div>
<pre><code>This is *true* markdown text.
</code></pre>
</div>
<p>This sentence has a footnote. <sup id="user_content_fnref:user_content_1"><a href="#fn:user_content_1" class="footnote-ref">1</a></sup></p>
<pre><code>fenced code block
</code></pre>
<table><thead><tr><th>Hello</th>
<th>World</th>
</tr></thead><tbody><tr><td>Foo</td>
<td>Bar</td>
</tr><tr><td>Baz</td>
<td>Rhymix</td>
</tr></tbody></table><div>
<hr /><ol><li id="user_content_fn:user_content_1">
<p>Here's the footnote content. <a href="#fnref:user_content_1" class="footnote-backref">↩︎</a></p>
</li>
</ol></div>