hextra icon indicating copy to clipboard operation
hextra copied to clipboard

footnotes within callout shortcodes do not render correctly

Open ahgraber opened this issue 1 year ago • 3 comments

Description

Footnote notation [^3] in callout shortcodes do not seem to be identified correctly; do not get included in footnotes.

Steps To Reproduce

  1. Post and commit of the issue - https://github.com/ahgraber/AIMLbling-about/blob/a8f21e74308c0aad446d9b29b72922c767fcd2d2/content/blog/the-compounding-error-of-generative-models/index.md

Expected Behavior

The footnote link should be superscripted and the footnote should be included.

Actual Behavior

The footnote link was left as plaintext "[^3]" and the footnote was not rendered

Screenshots

footnote link unrecognized image

footnote is not included (link should be 3 and it is missing) image

raw text of what should render image

Environment

  • hugo v0.124.1+extended darwin/arm64; blog is prerendered into a docker container
  • Browser: Arc, Safari, Firefox
  • Theme Version: v0.7.3

Additional Context

ahgraber avatar May 02 '24 19:05 ahgraber

Hi @ahgraber thank you for reporting this.

Currently the callout shortcode doesn't have the context of its parent page, thus the footnote was not correctly parsed along with other ones in the parent page.

I'll see what I could do to fix it.

imfing avatar May 16 '24 22:05 imfing

@imfing Thanks! I saw comments on hugo forums about the same; it seems like it might require jumping through a lot of hoops to provide the parent context, which might induce a lot of edge cases? If this becomes a wontfix because of the trouble, I fully understand!

ahgraber avatar May 16 '24 23:05 ahgraber

I'd keep this open, while waiting to see if there could be any solutions from Hugo community in the future.

imfing avatar May 29 '24 21:05 imfing