hi,
There is a bug with footnote backreferences: they should be added always as a direct child of the <li>
tag, but instead, whenever li ends with a p element inside a footnote, it becomes a child of that paragraph.
when it’s a blockquote or figure, then the backreference (ex: <a href="#fnref:9" class="footnote-backref" role="doc-backlink">↩︎</a>
) is a direct child of <li>
as expected.
I may have understood why. the link (a
element) is added regardless of what precedes it.
Blockquotes always come with an end tag, while paragraphs normally don’t need one. Except in that case the browser interprets the code as the link being part of the paragraph. It makes sense. So the problem is in the code generated and this inconsistency should be corrected.
These are exemples of markdown texts, and the output. But beware these are outputs from developer tools, which re-add the end tags to paragraphs. The direct source code (ctrl-u) does not show those </p>
meaning that it’s really the browser which interprets things in an unexpected way. Thanks for correcting this. the backref should always be a direct child of li.
[^note]: Monkeys and chimpanzees have been seen hoarding fruits, perhaps intuiting that they risked missing the occasion to come by again to eat more of them.
<li id="fn:9"><p>Monkeys and chimpanzees have been seen hoarding fruits, perhaps intuiting that they risked missing the occasion to come by again to eat more of them. <a href="#fnref:9" class="footnote-backref" role="doc-backlink">↩︎</a></p></li>
-------------
[^note]: Monkeys and chimpanzees have been seen hoarding fruits, perhaps intuiting that they risked missing the occasion to come by again to eat more of them.
> AAAAA
<li id="fn:9"><p>Monkeys and chimpanzees have been seen hoarding fruits, perhaps intuiting that they risked missing the occasion to come by again to eat more of them.</p><blockquote><p>AAAAA</p></blockquote> <a href="#fnref:9" class="footnote-backref" role="doc-backlink">↩︎</a></li>
-----------------
[^note]: Monkeys and chimpanzees have been seen hoarding fruits, perhaps intuiting that they risked missing the occasion to come by again to eat more of them.

<li id="fn:9"><p>Monkeys and chimpanzees have been seen hoarding fruits, perhaps intuiting that they risked missing the occasion to come by again to eat more of them.</p><figure class="image"><a href="http://localhost:1313/Images/images_article_instincto/squirel_wallnuts_42_gallions.webp" target="_blank"><img src="http://localhost:1313/Images/images_article_instincto/squirel_wallnuts_42_gallions.webp" srcset="http://localhost:1313/Images/images_article_instincto/squirel_wallnuts_42_gallions_hue3c6c8929904e07c749a12a2a7acda46_74852_200x0_resize_q92_h2_lanczos_2.webp 200w, http://localhost:1313/Images/images_article_instincto/squirel_wallnuts_42_gallions_hue3c6c8929904e07c749a12a2a7acda46_74852_400x0_resize_q92_h2_lanczos_2.webp 400w, http://localhost:1313/Images/images_article_instincto/squirel_wallnuts_42_gallions_hue3c6c8929904e07c749a12a2a7acda46_74852_604x0_resize_q92_h2_lanczos_2.webp 604w, http://localhost:1313/Images/images_article_instincto/squirel_wallnuts_42_gallions.webp 691w" width="691" height="518" loading="lazy" alt="squirrel_walnuts" sizes="(max-width: 400px) 100vw, (max-width: 604px) 50vw, 35vw" style="max-width:691px;max-height:min(518px,500px)"></a></figure> <a href="#fnref:9" class="footnote-backref" role="doc-backlink">↩︎</a></li>