markup/goldmark: Enhance footnote extension with auto-prefixing option

This commit introduces a new option, enableAutoIDPrefix, to the Goldmark
footnote extension. When enabled, it prepends a unique prefix to
footnote IDs, preventing clashes when multiple documents are rendered
together. This prefix is unique to each logical path, which means that
the prefix is not unique across content dimensions such as language.
This change also refactors the extension's configuration from a boolean
to a struct.

Closes #8045
This commit is contained in:
Joe Mooring
2025-09-12 20:19:18 -07:00
committed by Bjørn Erik Pedersen
parent 18b9b6488b
commit 47678d8cbd
7 changed files with 122 additions and 25 deletions
+3 -1
View File
@@ -1238,7 +1238,9 @@ config:
enable: false
superscript:
enable: false
footnote: true
footnote:
enable: true
enableAutoIDPrefix: false
linkify: true
linkifyProtocol: https
passthrough: