Page MenuHomePhabricator

Merge sub-references when they have the same content
Closed, DuplicatePublic

Description

<ref name="a">book</ref>
<ref extends="a">page 2</ref>
<ref extends="a">page 2</ref>

is currently rendered as:

  • book
    • page 2
    • page 2

That's not wrong, but: Users expect these two identical sub-references to be merged, because this is how top-level references also behave.

Event Timeline

Change 556381 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Cite@master] Add parser test for duplicate extended references

https://gerrit.wikimedia.org/r/556381

Change 556381 merged by jenkins-bot:
[mediawiki/extensions/Cite@master] Add parser test for duplicate extended references

https://gerrit.wikimedia.org/r/556381

this is how top-level references also behave

Doesn't seem to be the case. Top-level (or any other) references are only collapsed together when they are named, both have the same name, and the content is identical. It sounds like a nice feature, but would be entirely new.

Here's the syntax which matches the current feature, and it already does work correctly for subreferences. I think we should close this task.

<ref name="a">book</ref>
<ref name="b" extends="a">page 2</ref>
<ref name="b" extends="a">page 2</ref>

Oops, I see the same discussion already took place on the deduplicated task.

Change 562860 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/Cite@master] Remove invalid test case

https://gerrit.wikimedia.org/r/562860

Change 562860 merged by jenkins-bot:
[mediawiki/extensions/Cite@master] Remove invalid test case

https://gerrit.wikimedia.org/r/562860