Skip Menu |

This queue is for tickets about the CGI-Wiki-Plugin-Diff CPAN distribution.

Report information
The Basics
Id: 6284
Status: resolved
Priority: 0/
Queue: CGI-Wiki-Plugin-Diff

People
Owner: Nobody in particular
Requestors: gro.edolnwod [...] lrep
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: False positive triggered by punctuation
Take a look at the word "Water" in Line 2 of this listing: http://london.openguides.org/index.cgi?id=Shepherd%27s_Bush_Roundabout&version=7&diffversion=8 As you can see, it's marked as having been replaced, despite occurring in the same place in both versions. I think it's triggered by the trailing full stop in the second version.
Not sure if this is really a bug. The first occurrence of "water" is not a difference, and is correspondingly not highlighted. The second occurrence, [Thames ]"Water" has differing punctuation. It is showing as a difference as the word has a trailing whitespace in the right version, as it is followed by no punctuation and another word. In the left version, it is followed immediately by punctuation and no whitespace. The current algorithm absorbs trailing whitespace into the word, so as to get a nice block of highlight for each phrase. I'll need to think about this. Ivor.
This is now resolved in version 0.06. I have also added a test to 02_diff.t for this very circumstance. There is now a method get_token which handles this.