Finally fixed #goldmark footnote support in my #Hugo shortcode. Thanks to the Hugo team, especially jmooring!
---
It should be {{ .Inner }} and not {{- .Inner -}} or {{- .Inner | markdownify -}} or {{ .Inner | mardownify }}.
There's a conflict causing all the messed-up rendering I see when testing.
1. The default of .Inner is markdown, so piping it to markdown again is definitely not a good idea.
2. The space cancellation feature (the hyphens) is causing the content of .Inner to get attached to the HTML code, which should not happen in markdown for certain HTML elements.
Having fixed that, footnotes within my shortcode "accordion" (HTML: details element) now works. It also fixed the problem I was having when calling my image shortcode within the accordion shortcode.
Here's my current Hugo shortcodes: https://codeberg.org/yelosan/hugo-shortcodes/src/branch/main/layouts/shortcodes
Now, I don't have to use my workaround shortcodes for footnotes. ^_^;;