diff options
author | Tom N Harris <tnharris@whoopdedo.org> | 2013-02-16 18:27:12 -0500 |
---|---|---|
committer | Tom N Harris <tnharris@whoopdedo.org> | 2013-02-16 18:27:12 -0500 |
commit | a69506c52fbd9c92500be4f380acc7e68d4d6560 (patch) | |
tree | 9dec7cb8f3ba90292ed9c27a9f47648971a5c05b | |
parent | 56133a04d1c5dcd4825f4c0c978b8a9336d603d0 (diff) | |
download | rpg-a69506c52fbd9c92500be4f380acc7e68d4d6560.tar.gz rpg-a69506c52fbd9c92500be4f380acc7e68d4d6560.tar.bz2 |
Remove the prefix from inline diffs.
The line prefix was not actually indicating what it should indicate.
In particular, anything in a "changed" block would show a "!" even
if the entire line was added or deleted. Better to print nothing than
something that's wrong.
-rw-r--r-- | inc/DifferenceEngine.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php index 2125ad879..c15c8b163 100644 --- a/inc/DifferenceEngine.php +++ b/inc/DifferenceEngine.php @@ -1170,13 +1170,13 @@ class InlineDiffFormatter extends DiffFormatter { function _added($lines) { foreach ($lines as $line) { - print('<tr><td '.HTMLDiff::css('diff-lineheader').'>+</td><td '.HTMLDiff::css('diff-addedline').'>'. $line . "</td></tr>\n"); + print('<tr><td '.HTMLDiff::css('diff-lineheader').'> </td><td '.HTMLDiff::css('diff-addedline').'>'. $line . "</td></tr>\n"); } } function _deleted($lines) { foreach ($lines as $line) { - print('<tr><td '.HTMLDiff::css('diff-lineheader').'>-</td><td '.HTMLDiff::css('diff-deletedline').'><del>' . $line . "</del></td></tr>\n"); + print('<tr><td '.HTMLDiff::css('diff-lineheader').'> </td><td '.HTMLDiff::css('diff-deletedline').'><del>' . $line . "</del></td></tr>\n"); } } @@ -1191,7 +1191,7 @@ class InlineDiffFormatter extends DiffFormatter { $add = $diff->inline(); foreach ($add as $line) - print('<tr><td '.HTMLDiff::css('diff-lineheader').'>!</td><td>'.$line."</td></tr>\n"); + print('<tr><td '.HTMLDiff::css('diff-lineheader').'> </td><td>'.$line."</td></tr>\n"); } } |