Feature footnotes #351

Closed
wants to merge 4 commits into
from

Conversation

Projects
@lepture
Contributor

lepture commented Feb 17, 2014

Footnotes feature. It looks like MultiMarkdown Footnotes Syntax:

Here is some text containing a footnote.[^somesamplefootnote]

[^somesamplefootnote]: Here is the text of the footnote itself.

Related Issue: #27

@chjj Have a review of this patch. I will add test cases soon.

@lepture

This comment has been minimized.

Show comment
Hide comment
@lepture

lepture Feb 17, 2014

Contributor

NOTE: this feature is not fully implemented. There are still works to be done.

Here is some text containing a footnote.[^somesamplefootnote]

[^somesamplefootnote]: Here is the text of the footnote itself.
  multi paragraph

  * and even **markdown** markup in a footnote

We need to hack the text value of footnote, just like a list item.

Contributor

lepture commented Feb 17, 2014

NOTE: this feature is not fully implemented. There are still works to be done.

Here is some text containing a footnote.[^somesamplefootnote]

[^somesamplefootnote]: Here is the text of the footnote itself.
  multi paragraph

  * and even **markdown** markup in a footnote

We need to hack the text value of footnote, just like a list item.

@prashaantt

This comment has been minimized.

Show comment
Hide comment
@prashaantt

prashaantt Feb 17, 2014

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).

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).

@lepture

This comment has been minimized.

Show comment
Hide comment
@lepture

lepture Feb 18, 2014

Contributor

@prashaantt I am not sure that @chjj would agree with this feature. I'd like to implement the unfinished part when @chjj says yes.

Contributor

lepture commented Feb 18, 2014

@prashaantt I am not sure that @chjj would agree with this feature. I'd like to implement the unfinished part when @chjj says yes.

@contactjiayi

This comment has been minimized.

Show comment
Hide comment
@contactjiayi

contactjiayi Feb 20, 2014

This would be amazing @lepture and @chjj, I would love for this feature to be added as well.

This would be amazing @lepture and @chjj, I would love for this feature to be added as well.

@lepture

This comment has been minimized.

Show comment
Hide comment
@lepture

lepture Feb 20, 2014

Contributor

@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

Contributor

lepture commented Feb 20, 2014

@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

chjj added a commit that referenced this pull request Feb 23, 2014

@chjj

This comment has been minimized.

Show comment
Hide comment
@chjj

chjj Feb 23, 2014

Collaborator

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

Collaborator

chjj commented Feb 23, 2014

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

@lepture

This comment has been minimized.

Show comment
Hide comment
@lepture

lepture Feb 24, 2014

Contributor

@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

Contributor

lepture commented Feb 24, 2014

@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

@chjj

This comment has been minimized.

Show comment
Hide comment
@chjj

chjj Feb 24, 2014

Collaborator

@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.

Collaborator

chjj commented Feb 24, 2014

@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 added a commit that referenced this pull request Feb 24, 2014

@lepture

This comment has been minimized.

Show comment
Hide comment
@lepture

lepture Feb 24, 2014

Contributor

@chjj I did it in my Python fork. Seems your solution is better, I'll merge it into mine.

Contributor

lepture commented Feb 24, 2014

@chjj I did it in my Python fork. Seems your solution is better, I'll merge it into mine.

@lepture

This comment has been minimized.

Show comment
Hide comment
@lepture

lepture Feb 24, 2014

Contributor

@chjj Use footnote_start and footnote_end is a good idea. But I think my way is more elegant now. It looks like parsing list item.

lepture/mistune@a1f925e

Contributor

lepture commented Feb 24, 2014

@chjj Use footnote_start and footnote_end is a good idea. But I think my way is more elegant now. It looks like parsing list item.

lepture/mistune@a1f925e

@chjj

This comment has been minimized.

Show comment
Hide comment
@chjj

chjj Feb 24, 2014

Collaborator

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.

Collaborator

chjj commented Feb 24, 2014

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.

@mattly

This comment has been minimized.

Show comment
Hide comment
@mattly

mattly Feb 24, 2014

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.

mattly commented Feb 24, 2014

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.

@lepture

This comment has been minimized.

Show comment
Hide comment
@lepture

lepture Feb 26, 2014

Contributor

@chjj I'll sort out it soon, and send you my patch. I've finished the Python fork, and it works well.

Contributor

lepture commented Feb 26, 2014

@chjj I'll sort out it soon, and send you my patch. I've finished the Python fork, and it works well.

@jonschlinkert

This comment has been minimized.

Show comment
Hide comment

👍

@hugovincent

This comment has been minimized.

Show comment
Hide comment
@hugovincent

hugovincent Mar 31, 2014

Is this still being worked on or has it been rejected? I'd love to see this feature supported.

Is this still being worked on or has it been rejected? I'd love to see this feature supported.

@lawsonry

This comment has been minimized.

Show comment
Hide comment
@lawsonry

lawsonry Apr 1, 2014

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!

lawsonry commented Apr 1, 2014

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!

@nournia

This comment has been minimized.

Show comment
Hide comment
@nournia

nournia Apr 2, 2014

I've used marked.js of this PR as parser of EpicEditor. This results Invalid regular expression error. Is it something wrong with that editor?

nournia commented Apr 2, 2014

I've used marked.js of this PR as parser of EpicEditor. This results Invalid regular expression error. Is it something wrong with that editor?

@prashaantt

This comment has been minimized.

Show comment
Hide comment
@prashaantt

prashaantt Apr 23, 2014

Hello @chjj, @lepture, do you guys have any update on this?

Hello @chjj, @lepture, do you guys have any update on this?

@hugovincent

This comment has been minimized.

Show comment
Hide comment
@hugovincent

hugovincent Apr 28, 2014

Hi @chjj, @lepture, any plans to merge this into master? I'm using the feature-footnotes branch successfully.

Hi @chjj, @lepture, any plans to merge this into master? I'm using the feature-footnotes branch successfully.

@prashaantt

This comment has been minimized.

Show comment
Hide comment
@prashaantt

prashaantt May 5, 2014

@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.

@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.

@cliss cliss referenced this pull request in cliss/camel May 5, 2014

Closed

Markdown doesn't support footnotes #2

@prashaantt

This comment has been minimized.

Show comment
Hide comment
@prashaantt

prashaantt May 31, 2014

In case anybody's interested, I just pushed an update to my clone of the feature-footnotes branch that sacrifices performance and breaks marked's linearity but does get indented multi-para footnotes working correctly with inline Markdown parsing. It basically works, but is still nowhere near the full functionality as given here.

I tried @chjj's footnotes branch that attempts to do this better, but ran into rendering issues. I would be delighted if it could be finished officially once @chjj can spare some time.

In case anybody's interested, I just pushed an update to my clone of the feature-footnotes branch that sacrifices performance and breaks marked's linearity but does get indented multi-para footnotes working correctly with inline Markdown parsing. It basically works, but is still nowhere near the full functionality as given here.

I tried @chjj's footnotes branch that attempts to do this better, but ran into rendering issues. I would be delighted if it could be finished officially once @chjj can spare some time.

@adam-p adam-p referenced this pull request in adam-p/markdown-here Jun 14, 2014

Open

Add support for footnotes #94

Jack12816 added a commit to Jack12816/marked that referenced this pull request Jul 13, 2014

@vegetableman vegetableman referenced this pull request in atom/markdown-preview Feb 27, 2015

Open

Footnote Support #153

@jeffmcneill

This comment has been minimized.

Show comment
Hide comment
@jeffmcneill

jeffmcneill Feb 27, 2015

Not sure if this will help, but here are several implementations:

Support footnotes as implemented in Multimarkdown, Marked2, PHP Markdown Extra, and/or Pandoc.

Not sure if this will help, but here are several implementations:

Support footnotes as implemented in Multimarkdown, Marked2, PHP Markdown Extra, and/or Pandoc.

@afischer

This comment has been minimized.

Show comment
Hide comment
@afischer

afischer May 21, 2015

Does it look like this will be implemented?

Does it look like this will be implemented?

@marr

This comment has been minimized.

Show comment
Hide comment
@marr

marr Nov 16, 2015

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!

marr commented Nov 16, 2015

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!

@QingWei-Li QingWei-Li referenced this pull request in docsifyjs/docsify Jun 23, 2017

Closed

markdown 脚注缺失 #198

@joshbruce joshbruce added this to Queue in PRs Dec 1, 2017

@joshbruce

This comment has been minimized.

Show comment
Hide comment
@joshbruce

joshbruce Dec 26, 2017

Member

Closing as stale, missing tests, and merge conflicts.

Member

joshbruce commented Dec 26, 2017

Closing as stale, missing tests, and merge conflicts.

@joshbruce joshbruce closed this Dec 26, 2017

@lepture lepture deleted the lepture:feature-footnotes branch Dec 27, 2017

@joshbruce joshbruce moved this from Queue to Close in PRs Jan 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment