Goldmark includes a system for extensions, but the author is (understandably!) conservative about what is included in the main repository. This came up when I submitted a PR to enable labeled footnotes (
[^name] instead of just
[^1]), and only then realized that the goal of Goldmark’s footnote support was to mirror PHP Markdown Extra’s footnote feature, not BlackFriday’s.
Such a feature would be easy to craft as an extension, but it would have to be enabled at compile time and built into the Hugo executable, I believe. (If that is not the case, please let me know!)
I totally understand if we wouldn’t want to introduce another external dependency to Hugo just for the sake of this relatively minor point of feature parity with a deprecated library, but is there any interest in a feature like this? I’d be happy to create the Goldmark extension, but the author was clear that it wasn’t something that would be accepted in the main repository.
Would we perhaps be open to having a set of Goldmark extensions that are part of Hugo? It might be overkill or invite too much bikeshedding, but it feels like a useful question to ask going forward if Goldmark is going to be the default renderer; eventually I imagine there might be other Markdown rendering features that would benefit Hugo.
(Background: I rely on the unique anchor tags generated by labeling footnotes this way (when assembling several pages into a larger one) so for now I’m sticking with BlackFriday as my Markdown renderer, but I’d like to be ready for a future where that’s no longer an option.)