Footnote support
I'm generating a lot of Markdown files, and use footnotes for citations, typically keeping the full details out of the context of what's fed to agents consuming said markdown.
Opening a note containing Github style footnotes in the visual editor and making any edit rewrites every footnote in the file into rendered-HTML-style markdown. The [^id] syntax is lost and replaced with numeric links plus a generated ## Footnotes section containing literal backreference links like [↩2](#user-content-fnref-a-2).
Raw mode is unaffected.
Minimal reproducer
note.md:
Text.[^a]
[^a]: Note.Open in the visual editor, type any character anywhere, save.
Actual:
Text.[1](#user-content-fn-a)
## Footnotes
1. Note. [↩](#user-content-fnref-a)Expected: the file is unchanged apart from the edit.
With two references to the same footnote, the second backref appears as [↩2](#user-content-fnref-a-2):
Text.[^a] More.[^a]
[^a]: Note.→
Text.[1](#user-content-fn-a) More.[1](#user-content-fn-a)
## Footnotes
1. Note. [↩](#user-content-fnref-a) [↩2](#user-content-fnref-a-2)Source: refactoringhq/tolaria