Skip to content
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

Repeated footnotes #62

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

Repeated footnotes #62

powerpak opened this issue Jun 18, 2013 · 3 comments
Assignees

Comments

@powerpak
Copy link
Contributor

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
Copy link
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!

@powerpak
Copy link
Contributor Author

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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants