ID: 16562
Updated by: jan@horde.org
Reported By: cweiske at php dot net
Summary: inline renderer shows too much text as changed
-Status: Open
+Status: Bogus
Type: Bug
Package: Text_Diff
Package Version: 1.1.1
PHP Version: Irrelevant
Roadmap Versions:
New Comment:
-Status: Open
+Status: Bogus
Thank you for taking the time to write to us, but this is not
a bug.
This is exactly how the inline renderer should work. It shows
word-based diffs.
Previous Comments:
------------------------------------------------------------------------
[2009-09-02 11:33:49] cweiske
Description:
------------
The inline renderer shows too much of the content as changed - even if
there has nothing been changed.
I tried both
array('split_level' => 'lines')
array('split_level' => 'words')
but 'words" does not seem to work as expected (seems switched - linesarray('split_level' => 'words')
splits at words, words splits at lines)
This is probably a duplicate of bug #4982.
Test script:
---------------
require_once 'Text/Diff.php';
require_once 'Text/Diff/Renderer/inline.php';
$diff = new Text_Diff('auto', array(array('a bcd e'), array('a bCd
e')));
$renderer = new Text_Diff_Renderer_inline();
echo $renderer->render($diff);
Expected result:
----------------
a b<del>c</del><ins>C</ins>d e
Actual result:
--------------
a <del>bcd</del><ins>bCd</ins> e
------------------------------------------------------------------------