Home » Text » Text_Diff » Bug #4301
tags not closed
Details
| Request #4301 | tags not closed |
|---|---|
| Submitted | 2005-05-07 00:46 UTC |
| From | franck at exeprod dot com |
| Assigned | chagenbu |
| Status | Duplicate |
| Package | Text_Diff |
| PHP Version | 4.3.9 |
| OS | fedora core 2 |
| Roadmaps | (Not assigned) |
Comments
[2005-05-07 00:46 UTC] franck at exeprod dot com
Description:
------------
Tags are not closed in inline rendered in some cases.
I'm not sure it's a bug, but should be great to add this somewhere in an example or in the documentation...
Reproduce code:
---------------
$test1 = array(
"line 1\n",
"line 2\n",
"line 3\n",
"line 4\n",
"line 5\n");
$test2 = array (
"line 1\n",
"line 2\n",
"line modif\n",
"new line\n",
"line 4\n",
"line 5\n");
$diff = new Text_Diff( $test1, $test2 );
$renderer = new Text_Diff_Renderer_inline();
$out = $renderer->render($diff);
Expected result:
----------------
line 1
line 2
line <del>3</del><ins>modif</ins>
<ins>new line</ins>
line 4
line 5
Actual result:
--------------
line 1
line 2
line <del>3</del><ins>modif
new line</ins>
line 4
line 5
[2005-05-07 00:56 UTC] franck at exeprod dot com
It's not a bug.
But for line by line display, actual result give hard work to display something like "trac" diff :
http://projects.edgewall.com/trac/wiki/WikiStart?action=diff&version=99