Update xdiff to not display the ,1 if the length is 1 on unified mode. Add the unit tests
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@4311 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -285,7 +285,8 @@ class xdiff
|
||||
$info .= ",0";
|
||||
$info .= " +";
|
||||
$info .= $diff["startLine2"];
|
||||
$info .= ",".$diff["length"];
|
||||
if ($diff["length"] !== 1)
|
||||
$info .= ",".$diff["length"];
|
||||
$info .= " @@\n";
|
||||
$d .= $info;
|
||||
$d .= "+".implode ("+", $diff["chunk"]);
|
||||
@@ -294,7 +295,8 @@ class xdiff
|
||||
{
|
||||
$info = "@@ -";
|
||||
$info .= $diff["startLine1"];
|
||||
$info .= ",".$diff["length"];
|
||||
if ($diff["length"] !== 1)
|
||||
$info .= ",".$diff["length"];
|
||||
$info .= " +";
|
||||
$info .= $diff["startLine2"];
|
||||
$info .= ",0";
|
||||
|
||||
Reference in New Issue
Block a user