Add footnotes support (#156)

This commit is contained in:
Dreampuf 2022-02-02 18:01:38 +08:00 committed by GitHub
parent c8709eecd1
commit 2251e8ad8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 1 deletions

View File

@ -125,7 +125,8 @@ func CompileMarkdown(
bf.Titleblock| bf.Titleblock|
bf.BackslashLineBreak| bf.BackslashLineBreak|
bf.DefinitionLists| bf.DefinitionLists|
bf.NoEmptyLineBeforeBlock, bf.NoEmptyLineBeforeBlock|
bf.Footnotes,
), ),
) )

View File

@ -1,3 +1,15 @@
<p>Use <a href="https://example.com">https://example.com</a></p> <p>Use <a href="https://example.com">https://example.com</a></p>
<p>Use <ac:rich-text-body>aaa</ac:rich-text-body></p> <p>Use <ac:rich-text-body>aaa</ac:rich-text-body></p>
<p>Use footnotes link <sup class="footnote-ref" id="fnref:1"><a href="#fn:1">1</a></sup></p>
<div class="footnotes">
<hr />
<ol>
<li id="fn:1">a footnote link</li>
</ol>
</div>

View File

@ -1,3 +1,6 @@
Use <https://example.com> Use <https://example.com>
Use <ac:rich-text-body>aaa</ac:rich-text-body> Use <ac:rich-text-body>aaa</ac:rich-text-body>
Use footnotes link [^1]
[^1]: a footnote link