Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.2.3

Request #4982 diff on a little bit wrong place with inline renderer
Submitted: 2005-08-03 10:35 UTC
From: thomas at luz-webwide dot de Assigned:
Status: Open Package: Text_Diff
PHP Version: 5.0.4 OS: windows 2000
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 47 - 27 = ?

 
 [2005-08-03 10:35 UTC] thomas at luz-webwide dot de
Description: ------------ The following script shows the new line not at the exact position. The two files are : /* 1.txt : This line is the same. This line is different in 1.txt This line is the same. This is gone away !! */ /* 2.txt This line is the same. This is new !! This line is different in 2.txt This line is the same. */ Test script: --------------- .*)"; $regexnew = "(.*)"; $text = $renderer->render($diff); $textold = preg_replace($regexold,'',$text); $textnew = preg_replace($regexnew,'',$text); ?> DIFF TEST
Expected result: ---------------- The new line should appear as a single line, actualy it is shown on two lines (see html below). Actual result: --------------
This line is the same.
This is new !!
This
line is different in 1.txt2.txt
This line is the same.
This is gone away !!
This line is the same.
This is new !!
This
line is different in 2.txt
This line is the same.

This line is the same.
This is new !!
This
line is different in 1.txt
This line is the same.
This is gone away !!

Comments

 [2005-08-03 10:41 UTC] yunosh
Your output is very confusing. Can please remove the tags and BRs, and post again the expected and actual output?
 [2005-08-03 10:56 UTC] thomas at luz-webwide dot de
The actual result is : This line is the same. This<ins> is new !! This</ins> line is different in <del>1.txt</del><ins>2.txt</ins> This line is the same. <del>This is gone away !!</del> The expected result is : This line is the same. <ins>This is new !!</ins> This line is different in <del>1.txt</del><ins>2.txt</ins> This line is the same. <del>This is gone away !!</del>
 [2005-08-03 11:19 UTC] yunosh
The result is syntactically correct, but maybe we can still fix it.
 [2005-08-03 11:59 UTC] thomas at luz-webwide dot de
I dont think that its correct. Try "Hello I'm new" as the new line. The result is : This line is the same. <del>This</del><ins>Hello I'm new ! This</ins> line is different in ....
 [2007-09-26 15:31 UTC] yunosh (Jan Schneider)
It's still syntactically correct, but not the best result, considering that the inline renderer is for human consumption.
 [2007-12-07 09:58 UTC] jonhg (Jon HÃ¥vard Gundersen)
Hello! We are using Text_Diff to compare revision of text, and this is so far the only annoying bug we have found. It would be very nice if you could look into it. An example from our tests: Original text: <p>This is a nice small paragraph<p> New text: <p>This is a nice</p> <p>new text</p> <p>small paragraph</p> Result: <p>This is a [DEL]nice[/DEL][INS]</p> <p>new text</p> <p>nice[/INS] small paragraph</p> As stated before the result are in a way correct, but it is very confusing for our customer which are reading the rendered result.