zola: Footnote in title don't work as expected
Bug Report
Footnote link in header will appear prior to header.
Environment
❯ uname -srmo
Linux 4.14.90-1-MANJARO x86_64 GNU/Linux
❯ zola --version
zola 0.5.1
Step to reproduce
content/test.md:
+++
template = "page.html"
+++
# header[^1]
another[^2] footnote.
[^1]: footnote one
[^2]: footnote two
template/page.md:
{{ page.content | safe }}
build command: zola build
Expected Behavior
Output should be same as what pulldown-cmark
out:
<h1>header<sup class="footnote-reference"><a href="#1">1</a></sup></h1>
<p>another<sup class="footnote-reference"><a href="#2">2</a></sup> footnote.</p>
<div class="footnote-definition" id="1"><sup class="footnote-definition-label">1</sup>
<p>footnote one
<sup class="footnote-reference"><a href="#2">2</a></sup>: footnote two</p>
</div>
Current Behavior
<sup class="footnote-reference"><a href="#1">1</a></sup><h1 id="header">header</h1>
<p>another<sup class="footnote-reference"><a href="#2">2</a></sup> footnote.</p>
<div class="footnote-definition" id="1"><sup class="footnote-definition-label">1</sup>
<p>footnote one
<sup class="footnote-reference"><a href="#2">2</a></sup>: footnote two</p>
</div>
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (8 by maintainers)
Commits related to this issue
- Footnote is now supported in headers This fixes #569 . `markdown_to_html` is heavily refactored, header-related things is handled in a second pass. — committed to peng1999/zola by peng1999 5 years ago
This should be marked as
done
since #581 has been merged.