Support footnote links
See original GitHub issue- Markwon version: 4.6.2
Hey @noties. It’s more of a feature request. Can markwon support footnotes or maybe how can i implement footnote links ?
Here's a simple footnote,[^1] and here's a longer one.[^bignote]
[^1]: This is the first footnote.
[^bignote]: Here's one with multiple paragraphs and code.
In the above example, clicking on [^1], scrolls to to bottom [^1]: This is the first footnote.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Insert footnotes and endnotes - Microsoft Support
Insert footnotes and endnotes · Click where you want to reference to the footnote or endnote. · On the References tab, select Insert...
Read more >ii.com: Links and Footnotes in Markdown - Infinite Ink
All flavors of Markdown support by-reference links, but only some support footnotes. I'll use the Markdown source code of this article to test...
Read more >Footnotes now supported in Markdown fields - The GitHub Blog
You can now use footnote syntax in any Markdown field! Footnotes are displayed as superscript links. Click them to jump to their referenced ......
Read more >Support footnote return links · Issue #40 · yuin/goldmark - GitHub
As mentioned in gohugoio/hugo/issues/6551 Goldmark seems to not support footnote return links although they are supported by PHP Markdown ...
Read more >Creating footnotes in WORD - Chicago Manual of Style and ...
2.Click the References tab. · 3.In the Footnotes group, choose Insert Footnote. This inserts the superscript number in the text and then moves...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello @damionx7 ,
the
[comment]: comment
markdown is actually a link reference, for example:And footnotes indeed are clashing with those. Unfortunately the link references are hardcoded into the parser, so it is not easy to add support for footnotes with current syntax
Hello @damionx7 ,
yeah, sorry, I was unavailable. I don’t think it is possible to override default handling of reference links within the parser itself. There are just too many parts to consider. If you are interested you can take a look at the
LinkReferenceDefinitionParser
in thecommonmark-java
project. And relatedParagraphParser
andDocumentParser
parsers. Adding footnotes support would require a major change to all these components.I guess this is where
commonmark-java
inflexibility starts to play a role.Markwon
has been relying oncommonmark
internals in order to tweak its parsing and make it more flexible. But lately they had changed internals in order to add support for source positions (unfortunately they are not suitable for editors, so good for nothing really). And this leftMarkwon
behind as change is a bit more that I had anticipated before. Right now I’m seriously consider moving to other parsing stack, but still not sure if an abstract parsing layer should be added (so backends could be changed) or a different engine should be solely used or, finally, writing own solution for parsing.Anyway, right now I see conceptually only one solution to the footnotes. Preprocess raw markdown and do no rely on parser at all. For example it is no uncommon for footnotes to be styled (marked) so you would want to run
Markwon
other then also. Something along these lines (pseudocode):[^1]
[^1]: **Footnote** content