Skip to content

Commit 3a4131b

Browse files
committed
Add example of footnotes
Fixes #118
1 parent bedb4b7 commit 3a4131b

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

index.html

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ <h2><a id="user-content-inline-html" class="anchor" href="#inline-html" aria-hid
445445

446446
</a><h2><a name="user-content-html"></a><a id="user-content-inline-html-1" class="anchor" href="#inline-html-1" aria-hidden="true"><span class="octicon octicon-link"></span></a>Inline HTML</h2>
447447

448-
<p>You can also use raw HTML in your Markdown, and it'll mostly work pretty well.</p>
448+
<p>You can also use raw HTML in your Markdown<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup>, and it'll mostly work pretty well<sup><a href="#user-content-fn-2" id="user-content-fnref-2" data-footnote-ref="" aria-describedby="footnote-label">2</a></sup>.</p>
449449

450450
<pre lang="no-highlight"><code>&lt;dl&gt;
451451
&lt;dt&gt;Definition list&lt;/dt&gt;
@@ -1861,6 +1861,28 @@ <h3 id="user-content-backslash"><a id="user-content-backslash-escapes" class="an
18611861
.pipe(myth())
18621862
.pipe(gulp.dest(<span class="pl-s"><span class="pl-pds">'</span>dist<span class="pl-pds">'</span></span>));
18631863
});</pre></div>
1864+
1865+
<h2><a id="user-content-footnotes" class="anchor" href="#footnotes" aria-hidden="true"><span class="octicon octicon-link"></span></a>Footnotes</h2>
1866+
1867+
<p>Here's an example of footnotes in action. This paragraph contains multiple footnote references<sup><a href="#user-content-fn-3" id="user-content-fnref-3" data-footnote-ref="" aria-describedby="footnote-label">3</a></sup> to demonstrate how they appear in GitHub-style Markdown<sup><a href="#user-content-fn-4" id="user-content-fnref-4" data-footnote-ref="" aria-describedby="footnote-label">4</a></sup>.</p>
1868+
1869+
<section data-footnotes="" class="footnotes"><h2 id="footnote-label" class="sr-only">Footnotes</h2>
1870+
<ol>
1871+
<li id="user-content-fn-1">
1872+
<p>HTML elements like <code>&lt;em&gt;</code> and <code>&lt;strong&gt;</code> are supported natively. <a href="#user-content-fnref-1" data-footnote-backref="" aria-label="Back to reference 1" class="data-footnote-backref"></a></p>
1873+
</li>
1874+
<li id="user-content-fn-2">
1875+
<p>Though there are some limitations compared to pure Markdown syntax. <a href="#user-content-fnref-2" data-footnote-backref="" aria-label="Back to reference 2" class="data-footnote-backref"></a></p>
1876+
</li>
1877+
<li id="user-content-fn-3">
1878+
<p>Footnotes are automatically numbered and linked back to their references. <a href="#user-content-fnref-3" data-footnote-backref="" aria-label="Back to reference 3" class="data-footnote-backref"></a></p>
1879+
</li>
1880+
<li id="user-content-fn-4">
1881+
<p>GitHub's Markdown processor generates this exact HTML structure for footnotes. <a href="#user-content-fnref-4" data-footnote-backref="" aria-label="Back to reference 4" class="data-footnote-backref"></a></p>
1882+
</li>
1883+
</ol>
1884+
</section>
1885+
18641886
</article>
18651887
<a class="github-fork-ribbon" href="https://github.com/sindresorhus/github-markdown-css" data-ribbon="Fork me on GitHub" title="Fork me on GitHub">Fork me on GitHub</a>
18661888
</body>

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ You can use [GitHub's `/markdown` API](https://docs.github.com/en/free-pro-team@
4848

4949
There are 3 themes provided in this package:
5050

51-
- **github-markdown.css**: (default) Automatically switches between light and dark through [`@media (prefers-color-scheme)`](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme).
51+
- **github-markdown.css**: (default) Automatically switches between light and dark through [`@media (prefers-color-scheme)`](https://developer.mozilla.org/docs/Web/CSS/@media/prefers-color-scheme).
5252
- **github-markdown-light.css**: Light-only.
5353
- **github-markdown-dark.css**: Dark-only.
5454

0 commit comments

Comments
 (0)