Last modified: 2011-03-13 18:05:22 UTC
Created attachment 3647 [details]
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.
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. ***
The software shouldn't be making this kind of changes automatically. Several bot script can do this kind of task.