Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--reference-location=section and --reference-location=block cause duplicate footnote section ids #9455

Closed
van-de-bugger opened this issue Feb 13, 2024 · 3 comments
Labels

Comments

@van-de-bugger
Copy link

$ pandoc --version
pandoc 3.1.3
Features: -server +lua
Scripting engine: Lua 5.4
User data directory: /home/liveuser/.local/share/pandoc
Copyright (C) 2006-2023 John MacFarlane. Web: https://pandoc.org
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.

$ cat test.md 
Header
======

Section 1
---------

Text^[note].

Section 2
---------

Another text^[another note].

$ pandoc -t html --reference-location=section --wrap=preserve ./test.md 
<h1 id="header">Header</h1>
<h2 id="section-1">Section 1</h2>
<p>Text<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a>.</p>
<aside id="footnotes" class="footnotes footnotes-end-of-section" role="doc-endnotes">
<hr />
<ol>
<li id="fn1"><p>note<a href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</aside>
<h2 id="section-2">Section 2</h2>
<p>Another text<a href="#fn2" class="footnote-ref" id="fnref2" role="doc-noteref"><sup>2</sup></a>.</p>
<aside id="footnotes" class="footnotes footnotes-end-of-section" role="doc-endnotes">
<hr />
<ol start="2">
<li id="fn2"><p>another note<a href="#fnref2" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</aside>

Note: pandoc generates two aside elements — that's ok, but both elements have the same footnotes id, which is definitely wrong — each id must be unique.

--reference-location=block causes the same problem.

@van-de-bugger van-de-bugger changed the title --referece-location=section causes duplicate footnote section ids --reference-location=section and --reference-location=block cause duplicate footnote section ids Feb 13, 2024
@jgm
Copy link
Owner

jgm commented Feb 13, 2024

Wasn't this just fixed yesterday in #8770 ?

@van-de-bugger
Copy link
Author

I don't know, probably, yes. Before submitting an issue, I scanned trough open and closed issues and didn't find nothing similar. I didn't check source code or pull requests.

@jgm
Copy link
Owner

jgm commented Feb 13, 2024

Yeah, I think this one didn't have an associated issue. Anyway, closing. Will be fixed in next release.

@jgm jgm closed this as completed Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants