Steps to replicate the issue
- Create wikitext:
<ref details="page 1" name="book">Miller</ref>
- Switch to VE
- Add anything to the page
- Click on Save changes... to open the save dialog
- Click on Review your changes to open the VisualDiff
What happens?:
The rendered preview in the diff shows [1] for the subref
What should have happened instead?:
The rendered preview in the diff should show [1.1] for the subref
Technical notes
There are two aspects to this.
Correct numbers
In the VE-core ve.dm.VisualDiff class, footnote numbers are completely overridden with simplistic numbering: ve.setProp( item, 'internal', 'overrideIndex', i + 1 ); . The ve.dm.MWReferenceNode gives this overrideIndex higher priority than its internally-calculated numbers. First, we should try to understand the exact problem that was being solved by this override. Then, we can decide to either continue using the override mechanism and fill it with the formatted subreference number, or we can drop the mechanism and try to simplify how this works. Numbering changes should probably not appear in the diff, but follow existing product decisions.
Reference list rendering
In the VE library ve.ui.DiffElement there's a part that handles how the ReferenceList is rendered handleRefList . We probably need to apply changes there to make it understand subrefs.
Next steps
- Get the numbering into the ReferenceNode class ( in the VE lib? )
- Get the numbers from the new VE ReferenceNode class into the VisualDiff


