Repeated footnotes #62

Closed
powerpak opened this Issue Jun 18, 2013 · 3 comments

Comments

Projects
None yet
2 participants
@powerpak
Contributor

powerpak commented Jun 18, 2013

From the documentation,

The footnote name has to be unique in the whole kramdown document. Therefore you can’t link to the same footnote definition twice.

I am curious why this is the case? It would seem to me that just like links with identifiers, repeating an identifier means you want the same footnote reference to appear linking to the same footnote. Repeating footnotes is not uncommon in prose, particularly when the footnotes are formatted as endnotes or utilized as citations.

I realize this is something that PHP Markdown Extra and pandoc don't currently handle any better. The former prohibits it, like kramdown, while the latter creates two footnotes with the same content if a footnote is repeated. But it would seem that the intent here is clear: a user repeating [^7] later in a document probably didn't mean that they wanted that literal text, they almost certainly wanted a repeated footnote. As for pandoc's behavior, repeating footnotes in HTML output (where they appear as endnotes) seems silly, but I guess it could make sense for LaTeX or a paginated output, in which case it would be better left up to the discretion of the typesetting software or macros.

@ghost ghost assigned gettalong Jun 20, 2013

@gettalong

This comment has been minimized.

Show comment Hide comment
@gettalong

gettalong Jun 20, 2013

Owner

The implementation of kramdown followed the original one from PHP Markdown Extra. However, it seems that the implementation has changed (see michelf/php-markdown#16).

Since implementing this change would not change the output of currently conforming documents, it can be included in the next release (if I find the time to implement it).

Thanks for bringing this to my attention!

Owner

gettalong commented Jun 20, 2013

The implementation of kramdown followed the original one from PHP Markdown Extra. However, it seems that the implementation has changed (see michelf/php-markdown#16).

Since implementing this change would not change the output of currently conforming documents, it can be included in the next release (if I find the time to implement it).

Thanks for bringing this to my attention!

@powerpak

This comment has been minimized.

Show comment Hide comment
@powerpak

powerpak Jun 20, 2013

Contributor

No problem! I'll do you one better, here's an implementation that I quickly threw together. Docs and tests updated to match. The tests related to footnotes all pass; there were some that weren't passing on the master that I left as-is (and believe are unrelated).

Contributor

powerpak commented Jun 20, 2013

No problem! I'll do you one better, here's an implementation that I quickly threw together. Docs and tests updated to match. The tests related to footnotes all pass; there were some that weren't passing on the master that I left as-is (and believe are unrelated).

@gettalong

This comment has been minimized.

Show comment Hide comment
@gettalong

gettalong Jul 1, 2013

Owner

Thanks for the pull request! With it and some additional fixes it should work.

Owner

gettalong commented Jul 1, 2013

Thanks for the pull request! With it and some additional fixes it should work.

@gettalong gettalong closed this Jul 1, 2013

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