Page MenuHomePhabricator

Same extension creates new subref
Closed, DeclinedPublic

Description

If the same extension is used again, a new subref is created each time. It would be more logical if it would link to the already existing subref.

Example: Subref [1.1] links to page 1 of the source. If I refer to page 1 at a later point in the article, subref [1.1] is not reused, but a new subref [1.2] is created.

Event Timeline

This would be inconsistent with the behavior of <ref> tags that don't use "extends". See also T11945: Automatically combine <ref>s containing the same text and T18222: Merge references stated multiple times (if 100% equal).

I note that it already works to use <ref name="foo p.123" extends="foo">p. 123</ref> and later refer to it as <ref name="foo p.123"/>, just as is done with non-book references.

Thanks a lot for the links!

<ref>Anonymous ref</ref>
<ref>Anonymous ref</ref>
<ref extends="a">Anonymous page</ref>
<ref extends="a">Anonymous page</ref>
<references>
<ref name="a">Named book</ref>
</references>

Result: [1] [2] [3.1] [3.2]. This is indeed consistent with how the Cite extension handled this before: unnamed <ref> are never merged. However, named <ref> are, and there is indeed a bug. I split that of to T242110.

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