| */␊ |
| public function fileCompare($orig, $chunks, $filename, $context=10)␊ |
| {␊ |
| $orig_lines = self::splitIntoLines($orig);␊ |
| $orig_lines = IDF_FileUtil::splitIntoLines($orig);␊ |
| $new_chunks = $this->mergeChunks($orig_lines, $chunks, $context);␊ |
| return $this->renderCompared($new_chunks, $filename);␊ |
| }␊ |
|
| foreach ($chunk as $line) {␊ |
| $line1 = ' ';␊ |
| $line2 = ' ';␊ |
| $line[2] = (strlen($line[2])) ? self::padLine(Pluf_esc($line[2])) : ' ';␊ |
| $line[2] = (strlen($line[2])) ? IDF_FileUtil::emphasizeControlCharacters(Pluf_esc($line[2])) : ' ';␊ |
| if ($line[0] and $line[1]) {␊ |
| $class = 'diff-c';␊ |
| $line1 = $line2 = $line[2];␊ |