PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Text » Text_Diff » Bug #6428

Problem with single digits after space

Details

Submitted2006-01-06 12:14 UTC
Fromfwd-pear at bluem dot net
Assignedyunosh
StatusClosed
PackageText_Diff
PHP Version5.1.1
OSIrrelevant (Mac OS X, Debian)
Roadmaps(Not assigned)

Comments

[2006-01-06 12:14 UTC] fwd-pear at bluem dot net

Description:
------------
When adding a space character (or multiple space characters)
to a line and the space is followed by a single digit, the
line will not appear in the inline diff, although the
difference is located correctly and the unified diff shows
the desired output.

Test script:
---------------
<?php

require_once 'Text/Diff.php';
require_once 'Text/Diff/Renderer.php';
require_once 'Text/Diff/Renderer/inline.php';

$from = array('Line 1', 'Another line');
$to = array('Line 1', 'Another line');

$d = new Text_Diff($from, $to);
$r = new Text_Diff_Renderer_inline();

print_r($r->render($d));

?>

Expected result:
----------------
Line <del>1</del><ins> 1</ins>
Another line

Actual result:
--------------
Another line

[2006-01-06 12:17 UTC] fwd-pear at bluem dot net

Forgot to add: Text_Diff current version, 0.1.1