aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Esham <[email protected]>2025-05-26 21:52:30 -0400
committerJohn MacFarlane <[email protected]>2025-05-27 08:53:33 -0700
commitccc0a5a630df414a580c5c58f1b0ad8133e1a398 (patch)
treea471bc50371cb7e6f8f2090a588d18c711011339
parent8d93cd794955578b105e163e8a79df2bc05fc02e (diff)
HTML writer: use the ID prefix in the ID for the footnotes section.
In commit 9190b19fc, we began to use the ID prefix for the <aside> holding the footnotes. In commit 41da8ad9e, we started to use a <section> for this instead and the ID-prefix functionality was lost. This commit resumes using the ID prefix in the ID of this element so that multiple documents can be combined into one without ID conflicts.
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs2
-rw-r--r--test/command/4235.md2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index 9d1a44e53..bb54f0f82 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -558,7 +558,7 @@ footnoteSection opts refLocation startCounter notes = do
| html5
, refLocation == EndOfDocument
-- Note: we need a section for a new slide in slide formats.
- = H5.section ! A5.id (fromString idName)
+ = H5.section ! prefixedId opts (fromString idName)
! A5.class_ className
! A5.role "doc-endnotes"
$ x
diff --git a/test/command/4235.md b/test/command/4235.md
index 09db17eea..6960e51cd 100644
--- a/test/command/4235.md
+++ b/test/command/4235.md
@@ -4,7 +4,7 @@ This.^[Has a footnote.]
^D
<p>This.<a href="#foofn1" class="footnote-ref" id="foofnref1"
role="doc-noteref"><sup>1</sup></a></p>
-<section id="footnotes" class="footnotes footnotes-end-of-document"
+<section id="foofootnotes" class="footnotes footnotes-end-of-document"
role="doc-endnotes">
<hr />
<ol>