Last modified: 2007-05-22 16:25:15 UTC
In an article contains the word "foo", when an edition is made to transform the plain word "foo" into a link with the syntax "[[foo (bar)|foo]]", the history page suffers from a bad comparison algorithm.
If "foo" is edited into "[[foo (bar)|foo]]", the comparison page identifies the original foo with the one in "[[foo (bar)...", as showned by the highlted text. It should identify it with the second foo, in "...|foo]]"
See for instance:
Note that, on the contrary, the identification is correct when editing
"[[foo]]" into "[[foo (bar)|foo]]"
"foo" into "[[bar|foo]]"
General simplicity and logical consistency would favor the first match, as with all other such changes.
On the contrary, when you change a text for a link with a tag, you should compare the text to the tag, while the title of the article that is linked may be completly different for the sake of disambiguation. Other changes behave as I expect: when "[[foo1]]" is changed to "[[foo2 (bar)|foo3]]", foo1 and foo3 are compared. (Note that in this case, [[foo1]] was already a link. The bug appears when it is nota link in the first place)
You are assuming that the comparison algorithm has any knowledge of wikitext syntax: it does not, it is a simple text comparison.
Such an intelligent comparison might be possible in the future but not right now.