Page MenuHomePhabricator

Extra <references /> blocks being displayed in VisualEditor
Closed, DuplicatePublic

Description

Original report: Template:sfn has started displaying oddly. When you Insert > Template for sfn, and then fill it out, you expect it to display something like "[1]". Instead, it takes up two lines. The first says "[1]" as expected, and the second shows a <references /> block with only that one item in it.

Everything's fine upon saving, but this is an unexpected display inside VisualEditor.

The display issue is more extensive than that: a <gallery> that contains a ref displays its own <references /> section immediately afterwards, upon opening. An infobox like {{drugbox}} in [[Aspirin]] looks normal upon opening, but if you edit the template, then refs are displayed (above the first sentence to the lead).

Is this itentional (e.g., as a way of displaying refs that are being transcluded)?