Page MenuHomePhabricator

Let footnotes (<ref>..<ref>) tags be nested within each other.
Closed, DuplicatePublicFeature

Description

Feature summary (what you would like to be able to do and where):

Nest footnotes `<ref>..</ref>` inside each other.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

https://en.wikisource.org/w/index.php?title=Page:A_voyage_to_Abyssinia_(Salt).djvu/360&oldid=15555613

In some works on Wikisource, footnotes can be nested inside each other, typically this is because the parent footnote is an extended note or annotation, with additional clarifications added as footnotes to a footnote.

In https://en.wikisource.org/wiki/Help:Footnotes_and_endnotes#Nested_footnotes it currently states that footnotes cannot be nested due to limitations in the Cite extension.

Ideally what should happen is that the nested tags should be relocated, such that they are a placed after the end of the containing parent. (i.e "reverse fostered").

Benefits (why should this be implemented?):

Allowing nested footnotes in this manner, would more directly support the lengthy style of footnote present in some source works, as well as on other projects allowing for extended footnotes, where additional (short) explanatory clarifications or annotations are added as a footnote to a footnote..

Possible approach

When constructing list of footnotes (for use in a later <references /> tag), a mini-DOM is built, where nested footnotes ( and associated "follows" are relocated such that they appear after the containing parent footnote (or it's follows). This mini-DOM is then used to construct the <references/> tag.

Event Timeline

ShakespeareFan00 renamed this task from Let footnotes (<ref>..<ref>) tags be nested within each other, or implement an extended <footnote>..</footnote> tag to Let footnotes (<ref>..<ref>) tags be nested within each other, or implement an extended <footnote>..</footnote> tag supporting longer footnotes..Dec 5 2025, 9:07 AM
ShakespeareFan00 updated the task description. (Show Details)
ShakespeareFan00 renamed this task from Let footnotes (<ref>..<ref>) tags be nested within each other, or implement an extended <footnote>..</footnote> tag supporting longer footnotes. to Let footnotes (<ref>..<ref>) tags be nested within each other..Dec 5 2025, 9:23 AM