Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed
https://markdown-it.github.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
179 lines
3.6 KiB
179 lines
3.6 KiB
|
|
Pandoc example:
|
|
.
|
|
Here is a footnote reference,[^1] and another.[^longnote]
|
|
|
|
[^1]: Here is the footnote.
|
|
|
|
[^longnote]: Here's one with multiple blocks.
|
|
|
|
Subsequent paragraphs are indented to show that they
|
|
belong to the previous footnote.
|
|
|
|
{ some.code }
|
|
|
|
The whole paragraph can be indented, or just the first
|
|
line. In this way, multi-paragraph footnotes work like
|
|
multi-paragraph list items.
|
|
|
|
This paragraph won't be part of the note, because it
|
|
isn't indented.
|
|
.
|
|
<p>Here is a footnote reference,<a href="#fn1" class="footnoteRef" id="fnref1"><sup>1</sup></a> and another.<a href="#fn2" class="footnoteRef" id="fnref2"><sup>2</sup></a></p>
|
|
<p>This paragraph won’t be part of the note, because it
|
|
isn’t indented.</p>
|
|
<div class="footnotes">
|
|
<hr>
|
|
<ol>
|
|
<li id="fn1"><p>Here is the footnote.<a href="#fnref1">↩</a></p>
|
|
</li>
|
|
<li id="fn2"><p>Here’s one with multiple blocks.</p>
|
|
<p>Subsequent paragraphs are indented to show that they
|
|
belong to the previous footnote.</p>
|
|
<pre><code>{ some.code }
|
|
</code></pre>
|
|
<p>The whole paragraph can be indented, or just the first
|
|
line. In this way, multi-paragraph footnotes work like
|
|
multi-paragraph list items.<a href="#fnref2">↩</a></p>
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
.
|
|
|
|
They could terminate each other:
|
|
|
|
.
|
|
[^1][^2][^3]
|
|
|
|
[^1]: foo
|
|
[^2]: bar
|
|
[^3]: baz
|
|
.
|
|
<p><a href="#fn1" class="footnoteRef" id="fnref1"><sup>1</sup></a><a href="#fn2" class="footnoteRef" id="fnref2"><sup>2</sup></a><a href="#fn3" class="footnoteRef" id="fnref3"><sup>3</sup></a></p>
|
|
<div class="footnotes">
|
|
<hr>
|
|
<ol>
|
|
<li id="fn1"><p>foo<a href="#fnref1">↩</a></p>
|
|
</li>
|
|
<li id="fn2"><p>bar<a href="#fnref2">↩</a></p>
|
|
</li>
|
|
<li id="fn3"><p>baz<a href="#fnref3">↩</a></p>
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
.
|
|
|
|
|
|
They could be inside blockquotes, and are lazy:
|
|
.
|
|
[^foo]
|
|
|
|
> [^foo]: bar
|
|
baz
|
|
.
|
|
<p><a href="#fn1" class="footnoteRef" id="fnref1"><sup>1</sup></a></p>
|
|
<blockquote>
|
|
</blockquote>
|
|
<div class="footnotes">
|
|
<hr>
|
|
<ol>
|
|
<li id="fn1"><p>bar
|
|
baz<a href="#fnref1">↩</a></p>
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
.
|
|
|
|
|
|
Their labels could not contain spaces or newlines:
|
|
|
|
.
|
|
[^ foo]: bar baz
|
|
|
|
[^foo
|
|
]: bar baz
|
|
.
|
|
<p>[^ foo]: bar baz</p>
|
|
<p>[^foo
|
|
]: bar baz</p>
|
|
.
|
|
|
|
We support inline notes too (pandoc example):
|
|
|
|
.
|
|
Here is an inline note.^[Inlines notes are easier to write, since
|
|
you don't have to pick an identifier and move down to type the
|
|
note.]
|
|
.
|
|
<p>Here is an inline note.<a href="#fn1" class="footnoteRef" id="fnref1"><sup>1</sup></a></p>
|
|
<div class="footnotes">
|
|
<hr>
|
|
<ol>
|
|
<li id="fn1"><p>Inlines notes are easier to write, since
|
|
you don’t have to pick an identifier and move down to type the
|
|
note.<a href="#fnref1">↩</a></p>
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
.
|
|
|
|
They could have arbitrary markup:
|
|
|
|
.
|
|
foo^[ *bar* ]
|
|
.
|
|
<p>foo<a href="#fn1" class="footnoteRef" id="fnref1"><sup>1</sup></a></p>
|
|
<div class="footnotes">
|
|
<hr>
|
|
<ol>
|
|
<li id="fn1"><p> <em>bar</em> <a href="#fnref1">↩</a></p>
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
.
|
|
|
|
Indents:
|
|
|
|
.
|
|
[^xxxxx] [^yyyyy]
|
|
|
|
[^xxxxx]: foo
|
|
---
|
|
|
|
[^yyyyy]: foo
|
|
---
|
|
.
|
|
<p><a href="#fn1" class="footnoteRef" id="fnref1"><sup>1</sup></a> <a href="#fn2" class="footnoteRef" id="fnref2"><sup>2</sup></a></p>
|
|
<hr>
|
|
<div class="footnotes">
|
|
<hr>
|
|
<ol>
|
|
<li id="fn1"><h2>foo</h2>
|
|
<a href="#fnref1">↩</a></li>
|
|
<li id="fn2"><p>foo<a href="#fnref2">↩</a></p>
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
.
|
|
|
|
Indents for the first line:
|
|
|
|
.
|
|
[^xxxxx] [^yyyyy]
|
|
|
|
[^xxxxx]: foo
|
|
|
|
[^yyyyy]: foo
|
|
.
|
|
<p><a href="#fn1" class="footnoteRef" id="fnref1"><sup>1</sup></a> <a href="#fn2" class="footnoteRef" id="fnref2"><sup>2</sup></a></p>
|
|
<div class="footnotes">
|
|
<hr>
|
|
<ol>
|
|
<li id="fn1"><p>foo<a href="#fnref1">↩</a></p>
|
|
</li>
|
|
<li id="fn2"><pre><code>foo
|
|
</code></pre>
|
|
<a href="#fnref2">↩</a></li>
|
|
</ol>
|
|
</div>
|
|
.
|
|
|