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.
The text was updated successfully, but these errors were encountered:
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).
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).
From the documentation,
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.The text was updated successfully, but these errors were encountered: