Page MenuHomePhabricator

Automatically combine <ref>s containing the same text
Closed, DeclinedPublic

Description

Author: mediazilla

Description:
Patch against Cite.php (SVN r22012)

I suggest changing the Cite extension to automatically combine <ref>s with the same text, just like those with the same name="..." parameter. It's not really necessary, but I think it doesn't hurt either. It's also just a minor change to the code, see the attached patch which uses the MD5 hash of the text instead of the name, when no name has been specified.


Version: unspecified
Severity: enhancement

Attached:

Details

Reference
bz9945

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 9:37 PM
bzimport added a project: Cite.
bzimport set Reference to bz9945.
bzimport added a subscriber: Unknown Object (MLST).

ayg wrote:

The patch makes the generated id much too long, and theoretically breaks links to existing id's (although they're fairly volatile, so probably there aren't many). On that basis it's unacceptable.

I'm not sure if there's so much point in doing this, really, since a) even tiny changes like whitespace will break the merging, and b) people will change one reference and not another without realizing. I foresee a lot of accidental duplication of references when people try to use this feature and get it slightly off. Manual merging is probably a better method.

  • Bug 16222 has been marked as a duplicate of this bug. ***

chinchi29 wrote:

The software shouldn't be making this kind of changes automatically. Several bot script can do this kind of task.