User story:
As VE user I want to be able to correctly see sub-refs when the content is only referenced by name in Wikitext.
Acceptance criteria:
<ref name="book">Miller 2025</ref> <ref name="book" details="page 1" />
Shows two refs in VE [1] and [1.1] both can be edited individually.
Implementation
There's a parser test at the moment that currently documents the broken state Parent reference used before sub-reference
This can be run by
./modules/mediawiki/bin/mwscript tests/parser/parserTests.php --wiki=dev --file=/srv/docker-dev/mediawiki/extensions/Cite/tests/parser/subReferencing.txt --filter "Parent reference used before sub-reference"
- Make the test expect the output needed ( in that case a valid main and subref )
- Fix the test by implementing the needed behavior in References.php in the Parsoid code
( Currently we only look at refs that have main and sub content in the tag, so we split them to create an "artificial" main ref. In this usecase that split does not need to happen, because the main ref is already its own reference )
Notes
Probably needs to be solved in Parsoid first the output there is also not correct yet.
For EditMode check ve-cite/dm and ce files , find extends usages and change to details
Outcome
<ref name="book">Miller 2025</ref> <ref name="book" details="page 1" /> <ref name="book2" details="page 2"> Miller 2022</ref>
