orgajs
orgajs copied to clipboard
Footnotes don't link back up to their 'usage'
Hey,
Just saw the comments around V2 and the good news around footnotes in #42. When trying out the example that was linked to, I noticed that the footnote doesn't link back up to where it was referenced in the text.
I think that the footnote should link back to all the places in the text where it has been referenced, so that the reader / end user can easily jump back to where it was used.
Just so we're clear about what I mean: here's an image of references from Wikipedia. The little ^ in front of every reference links back to the bit of the text that references it.

I suppose that if a footnote is referenced multiple times, then there should also be multiple targets you can jump to.
Thanks for all your hard work; it's much appreciated!
Assuming you mean to have this as part of the AST (if you mean just in the display, then ignore me) - Is this something that would be done better in post? It's not really part of the AST to link to footnote references, so it might not really make sense to include it there. That is to say, it isn't "meaningful" to the syntax tree to talk about where footnotes were referenced at the point of a footnote definition - it simply isn't part of the syntax.
Also, typically you are going to want to do some transformation on footnotes in post anyway (e.g., to group them at the bottom of a document), so in that process you could easily build up possible backlinks (example https://github.com/denoland/deno_website2/pull/1779).