@@ 276-291 (lines=16) @@ | ||
273 | * @param Operation $operation |
|
274 | * @param string $cssClass |
|
275 | */ |
|
276 | protected function processInsertOperation($operation, $cssClass) |
|
277 | { |
|
278 | $text = array(); |
|
279 | foreach ($this->newWords as $pos => $s) { |
|
280 | if ($pos >= $operation->startInNew && $pos < $operation->endInNew) { |
|
281 | if ($this->config->isIsolatedDiffTagPlaceholder($s) && isset($this->newIsolatedDiffTags[$pos])) { |
|
282 | foreach ($this->newIsolatedDiffTags[$pos] as $word) { |
|
283 | $text[] = $word; |
|
284 | } |
|
285 | } else { |
|
286 | $text[] = $s; |
|
287 | } |
|
288 | } |
|
289 | } |
|
290 | $this->insertTag( "ins", $cssClass, $text ); |
|
291 | } |
|
292 | ||
293 | /** |
|
294 | * @param Operation $operation |
|
@@ 297-312 (lines=16) @@ | ||
294 | * @param Operation $operation |
|
295 | * @param string $cssClass |
|
296 | */ |
|
297 | protected function processDeleteOperation($operation, $cssClass) |
|
298 | { |
|
299 | $text = array(); |
|
300 | foreach ($this->oldWords as $pos => $s) { |
|
301 | if ($pos >= $operation->startInOld && $pos < $operation->endInOld) { |
|
302 | if ($this->config->isIsolatedDiffTagPlaceholder($s) && isset($this->oldIsolatedDiffTags[$pos])) { |
|
303 | foreach ($this->oldIsolatedDiffTags[$pos] as $word) { |
|
304 | $text[] = $word; |
|
305 | } |
|
306 | } else { |
|
307 | $text[] = $s; |
|
308 | } |
|
309 | } |
|
310 | } |
|
311 | $this->insertTag( "del", $cssClass, $text ); |
|
312 | } |
|
313 | ||
314 | /** |
|
315 | * @param Operation $operation |
|
@@ 416-431 (lines=16) @@ | ||
413 | /** |
|
414 | * @param Operation $operation |
|
415 | */ |
|
416 | protected function processEqualOperation($operation) |
|
417 | { |
|
418 | $result = array(); |
|
419 | foreach ($this->newWords as $pos => $s) { |
|
420 | ||
421 | if ($pos >= $operation->startInNew && $pos < $operation->endInNew) { |
|
422 | if ($this->config->isIsolatedDiffTagPlaceholder($s) && isset($this->newIsolatedDiffTags[$pos])) { |
|
423 | ||
424 | $result[] = $this->diffIsolatedPlaceholder($operation, $pos, $s); |
|
425 | } else { |
|
426 | $result[] = $s; |
|
427 | } |
|
428 | } |
|
429 | } |
|
430 | $this->content .= implode( "", $result ); |
|
431 | } |
|
432 | ||
433 | /** |
|
434 | * @param string $text |