Keeping footnote references in the in the AST would be nicer for keeping the document as structured data, error reporting for missing definitions, etc (and we could still render the content as plain text if we wanted).
Implementation here is a little dicey - do we move away from markdown-it-footnote...?
A footnote reference without a corresponding footnote definition is just parsed as text:
Here, we add a footnote definition and the reference materializes in the AST:
This behavior comes from markdown-it-footnote - I'm pretty sure here, but I haven't dug super deep: https://github.com/markdown-it/markdown-it-footnote/blob/master/index.js#L256
Keeping footnote references in the in the AST would be nicer for keeping the document as structured data, error reporting for missing definitions, etc (and we could still render the content as plain text if we wanted).
Implementation here is a little dicey - do we move away from
markdown-it-footnote
...?