Home » Text » Text_Diff » Bug #6428
Problem with single digits after space
Details
| Submitted | 2006-01-06 12:14 UTC |
|---|---|
| From | fwd-pear at bluem dot net |
| Assigned | yunosh |
| Status | Closed |
| Package | Text_Diff |
| PHP Version | 5.1.1 |
| OS | Irrelevant (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