Support references with content defined inside <references/> block (<ref name=abc /> <references><ref name=abc>Content</ref></references>)
Closed, ResolvedPublic


VE should support references with content defined inside <references/> block. This style is widely used on the Polish Wikipedia to keep the wikitext mostly readable.

  • 8< ---------

Some text.<ref name=abc />

<references><ref name=abc>Content</ref></references>

  • 8< ---------

Live example:

And it would be really cool if it could also supports this (but I'm not holding my breath):

  • 8< ---------

Some text.{{r|abc}}

{{reflist|refs=<ref name=abc>Content</ref>}}

  • 8< ---------

About this feature on en.wp help pages: [[Help:Footnotes#Footnotes: list-defined references]]

Version: unspecified
Severity: major

This would require some help from the Parsoid side:

  • VE requires knowing the generated HTML for ref bodies, and Parsoid currently only provides these for inline refs with bodies (<ref name=asd>body</ref>), as (data-mw).html.body.
  • The simplest way to do this seems to be providing generated HTML for refs inside <references/> as an array of ref bodies inside <references/>'s data-mw.

When I try your sandbox, I can edit the references list using wikitext in the template dialog.

On German Wikipedia, this article is similar but has templates inside <references/>
It isnt editable with this notice repeating many times:

"This reference is defined in a template or other generated block, and for now can only be edited in source mode"

Change 75912 had a related patch set uploaded by Esanders:
[WIP] Ref in references support

On Parsoid topfail there are several dewp entries for <!-- comments --> within <references/> being moved around. I couldnt reproduce those bugs, probably because of selective serialization. If this is now editable, these dirty diffs may start happening in production. It would be good to test, but I suspect impact is quite low because I checked 20 featured articles and 10 good articles on dewp, and none had these comments within <references/>.

And here is one for whitespace within <references/>

Change 75912 merged by jenkins-bot:
Ref in references support

This is now merged and will get deployed today; however, to actually do what people want depends on a change in Parsoid that will get deployed tomorrow.

Add Comment