-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature footnotes #351
Feature footnotes #351
Conversation
Here is some text containing a footnote.[^somesamplefootnote] [^somesamplefootnote]: Here is the text of the footnote itself. - http://daringfireball.net/2005/07/footnotes - https://github.com/fletcher/MultiMarkdown/wiki/MultiMarkdown-Syntax-Guide#wiki-footnotes - http://six.pairlist.net/pipermail/markdown-discuss/2005-August/001442.html - http://six.pairlist.net/pipermail/markdown-discuss/2005-August/001480.html
NOTE: this feature is not fully implemented. There are still works to be done.
We need to hack the text value of footnote, just like a list item. |
Awesome @lepture, I would love this to be finished and pulled in. I began writing this myself a couple of days ago (see also #27 (comment)) but couldn't wrap my head around some of the stuff and gave up the first attempt (JS noob here). |
@prashaantt I am not sure that @chjj would agree with this feature. I'd like to implement the unfinished part when @chjj says yes. |
@prashaantt @contactjiayi I've just created a python fork of markdown. And I am working on footnotes feature in this repo: https://github.com/lepture/mistune |
Put up a branch and added a few fixes (footnotes weren't working for two different reasons). I still want to play around with it a bit more. cc @lepture |
@chjj There is still work to do with the footnotes rendering. For example, multiple lines of one footnote. We should unindent each line, and parse the footnote again. Here is what I did in the Python fork https://github.com/lepture/mistune/blob/master/mistune.py#L691 |
@lepture, oh, this doesn't handle (unindented) multiparagraph footnotes? I had my own branch written that accomplished this in a really sloppy way, but when I saw your code I assumed you did it a little bit better. I'll push my other branch now. |
@chjj I did it in my Python fork. Seems your solution is better, I'll merge it into mine. |
@chjj Use |
I'm totally open to different methods. Like I said, I find my way sloppy. I'll take a look at this in a bit. |
Here's the showdown implementation of footnotes if that helps. Quibbles about footnote class and a[rel="footnote"] vs. a.footnoteRef aside, it's almost identical to discount's implementation. I would love to see this feature in Marked because I want access to the parse tree for other reasons. |
@chjj I'll sort out it soon, and send you my patch. I've finished the Python fork, and it works well. |
👍 |
Is this still being worked on or has it been rejected? I'd love to see this feature supported. |
I'm relying on marked pretty heavily for some web apps in development so this will be something I will be actively creating in the next 24 hours. Stay tuned! |
I've used |
@hugovincent I agree it works in the basic scenario, but not when the footnote text is itself written in Markdown — i.e. MD-formatted links and formatting in the footnote definition don't get parsed into HTML. |
In case anybody's interested, I just pushed an update to my clone of the I tried @chjj's |
Not sure if this will help, but here are several implementations: Support footnotes as implemented in Multimarkdown, Marked2, PHP Markdown Extra, and/or Pandoc. |
Does it look like this will be implemented? |
Needs rebase. Fwiw, I'd consider multimarkdown(mmd) for their footnote support, but their node package isn't compiling for me. mnichols/node-mmd#4 Hope to see footnotes added to marked soon! |
Closing as stale, missing tests, and merge conflicts. |
Footnotes feature. It looks like MultiMarkdown Footnotes Syntax:
Related Issue: #27
@chjj Have a review of this patch. I will add test cases soon.