Lines Matching refs:diff

3  * A PHP diff engine for phpwiki. (Taken from phpwiki-1.3.3)
125 function diff($from_lines, $to_lines) {
517 * Class representing a 'diff' between two sequences of strings.
525 * Computes diff between sequences of strings.
533 $this->edits = $eng->diff($from_lines, $to_lines);
542 * $diff = new Diff($lines1, $lines2);
543 * $rev = $diff->reverse();
546 * original diff.
558 * Check for empty diff.
661 * Computes diff between sequences of strings.
676 * when computing the diff.
709 * This class formats the diff in classic diff format.
731 * Format a diff.
733 * @param Diff $diff A Diff object.
736 function format($diff) {
748 foreach ($diff->edits as $edit) {
898 'diff-addedline' => 'background-color: #ddffdd;',
899 'diff-deletedline' => 'background-color: #ffdddd;',
900 'diff-context' => 'background-color: #f5f5f5;',
901 'diff-mark' => 'color: #ff0000;',
924 * Additions by Axel Boldt follow, partly taken from diff.php, phpwiki-1.3.3
942 $this->_line .= '<strong '.HTMLDiff::css('diff-mark').'>'.$this->_escape($this->_group).'</strong>';
944 $this->_line .= '<span '.HTMLDiff::css('diff-addedline').'>'.$this->_escape($this->_group).'</span>';
946 $this->_line .= '<span '.HTMLDiff::css('diff-deletedline').'><del>'.$this->_escape($this->_group).'</del></span>';
1071 * "Unified" diff formatter.
1073 * This class formats the diff in classic "unified diff" format.
1105 * Wikipedia Table style diff formatter.
1117 * @param Diff $diff
1120 function format($diff) {
1123 $val = parent::format($diff);
1138 $r = '<tr><td '.HTMLDiff::css('diff-blockheader').' colspan="'.$this->colspan.'">'.$l1.":</td>\n".
1139 '<td '.HTMLDiff::css('diff-blockheader').' colspan="'.$this->colspan.'">'.$l2.":</td>\n".
1158 return '<td '.HTMLDiff::css('diff-lineheader').'>+</td>'.
1159 '<td '.HTMLDiff::css('diff-addedline').'>' . $line.'</td>';
1166 return '<td '.HTMLDiff::css('diff-lineheader').'>-</td>'.
1167 '<td '.HTMLDiff::css('diff-deletedline').'>' . $line.'</td>';
1175 return '<td '.HTMLDiff::css('diff-lineheader').'>&#160;</td>'.
1176 '<td '.HTMLDiff::css('diff-context').'>'.$this->_escape($line).'</td>';
1202 $diff = new WordLevelDiff($orig, $closing); // this escapes the diff data
1203 $del = $diff->orig();
1204 $add = $diff->closing();
1219 * Inline style diff formatter.
1231 * @param Diff $diff
1234 function format($diff) {
1237 $val = parent::format($diff);
1254 $r = '<tr><td colspan="'.$this->colspan.'" '.HTMLDiff::css('diff-blockheader').'>@@ '.$lang['line']." -$xbeg +$ybeg @@";
1255 $r .= ' <span '.HTMLDiff::css('diff-deletedline').'><del>'.$lang['deleted'].'</del></span>';
1256 $r .= ' <span '.HTMLDiff::css('diff-addedline').'>'.$lang['created'].'</span>';
1273 print('<tr><td '.HTMLDiff::css('diff-lineheader').'>&#160;</td><td '.HTMLDiff::css('diff-addedline').'>'. $this->_escape($line) . "</td></tr>\n");
1279 print('<tr><td '.HTMLDiff::css('diff-lineheader').'>&#160;</td><td '.HTMLDiff::css('diff-deletedline').'><del>' . $this->_escape($line) . "</del></td></tr>\n");
1285 print('<tr><td '.HTMLDiff::css('diff-lineheader').'>&#160;</td><td '.HTMLDiff::css('diff-context').'>'. $this->_escape($line) ."</td></tr>\n");
1290 $diff = new InlineWordLevelDiff($orig, $closing); // this escapes the diff data
1291 $add = $diff->inline();
1294 print('<tr><td '.HTMLDiff::css('diff-lineheader').'>&#160;</td><td>'.$line."</td></tr>\n");
1317 * Computes diff between 3 sequences of strings.
1326 $this->_edits = $this->_diff3($engine->diff($orig, $final1),
1327 $engine->diff($orig, $final2));
1376 * diff3 diff block, if any. */