https://bugzilla.wikimedia.org/show_bug.cgi?id=20707
Summary: Nested refs fail inside references block
Product: MediaWiki extensions
Version: any
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: Normal
Component: Cite
AssignedTo: [email protected]
ReportedBy: [email protected]
By design, Cite does not allow a <ref> to appear within another <ref>. (This
is probably a result of parser design and concerns over maintaining the
integrity of Cite's internal data stack.)
However, clever Wikipedians realized that one can use #tag to avoid Cite's
design limitations and create functional nested references such as:
AAA {{#tag:ref| BBB <ref> CCC </ref> }}
(See also: Bug 16330)
Recently, Cite was expanded to allow reference content to be defined within a
references block, i.e.
Foo <ref name="bar"/>
<references>
<ref name="bar">blah blah</ref>
</references>
While most references work fine in this context, the #tag based nested ref
constructions universally fail when moved inside <references>. Depending on
the number and order of #tag calls used and the depth of the stack the result
will either be an uninformative error message or a misnumbered reference list.
The solution to this is probably to create an implementation that generically
supports nested refs. (Part of the problem is that Cite was not intended to
allow for nested refs at all and though the #tag based hack worked previously
because of quirks in parser behavior, the same call structure doesn't work when
moved inside the references block.)
The "right" way to do this is probably to restructure Cite's internal data
stack and change the way the evaluation of references are hooked into the
parser. I will probably implement this myself eventually, though probably not
for some months.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l