diff = $d; parent::Text_Diff_Renderer(); } function _blockHeader($xbeg, $xlen, $ybeg, $ylen) { $removed = $xlen - $ylen; if ($removed > 0) { return 'Line ' . $xbeg . ' (now ' . $ybeg . '), was ' . $xlen . ' lines, now ' . $ylen . ' lines'; } } function _added($lines) { array_walk($lines, create_function('&$a,$b', '$a=htmlspecialchars($a);')); return ' ' . implode("\n ", $lines) . ''; } function _context($lines) { array_walk($lines, create_function('&$a,$b', '$a=htmlspecialchars($a);')); return "\n" . parent::_context($lines); } function _deleted($lines) { array_walk($lines, create_function('&$a,$b', '$a=htmlspecialchars($a);')); return ' ' . implode("\n ", $lines) . ''; } function _changed($orig, $final) { return $this->_deleted($orig) . "\n" . $this->_added($final); } function render() { return parent::render($this->diff); } }