01002: Ugly output from PmWiki's PHPDiff cf. GNU diff

Summary: Ugly output from PmWiki's PHPDiff cf. GNU diff
Created: 2008-01-13 10:36
Status: Open
Category: Bug
From: EemeliAro
Assigned:
Priority: 4
Version: 2.2.0-beta65
OS: n/a

Description: The way PmWiki archives page revisions is sometimes a bit awkward. Not incorrect, just not showing the changes in a neat way.

I don't have the time to figure out how to change PHPDiff, but to see what I mean, here are the outputs of PmWiki's PHPDiff (from scripts/phpdiff.php, the version last modified 10 June 2007) and the GNU diffutils diff (version 2.8.1).

>>> and <<< delimit the start and end of the strings.

old:
>>>One line without changes.

Two line with addition.

Three line with a change.

Four line deleted.

Five line with a change.
<<<

new:
>>>One line without changes.

Two line with an addition.

Three line with a single change.

Five line with another change.
<<<

phpdiff(old,new):
>>>3,9c3,7
< Two line with addition.
< 
< Three line with a change.
< 
< Four line deleted.
< 
< Five line with a change.
---
> Two line with an addition.
> 
> Three line with a single change.
> 
> Five line with another change.
<<<

gnudiff(old,new):
>>>3c3
< Two line with addition.
---
> Two line with an addition.
5c5
< Three line with a change.
---
> Three line with a single change.
7,9c7
< Four line deleted.
< 
< Five line with a change.
---
> Five line with another change.
<<<

See also