function DrupalDiffInline::process_chunk

cis7 DiffEngine.php DrupalDiffInline::process_chunk($chunk)
cle7 DiffEngine.php DrupalDiffInline::process_chunk($chunk)
elmsmedia7 DiffEngine.php DrupalDiffInline::process_chunk($chunk)
icor7 DiffEngine.php DrupalDiffInline::process_chunk($chunk)
meedjum_blog7 DiffEngine.php DrupalDiffInline::process_chunk($chunk)
mooc7 DiffEngine.php DrupalDiffInline::process_chunk($chunk)

Merge chunk segments between tag delimiters.

1 call to DrupalDiffInline::process_chunk()
DrupalDiffInline::render in sites/all/modules/ulmus/diff/DiffEngine.php
Render differences inline using HTML markup.

File

sites/all/modules/ulmus/diff/DiffEngine.php, line 1286
A PHP diff engine for phpwiki. (Taken from phpwiki-1.3.3)

Class

DrupalDiffInline
Drupal inline Diff formatter. @private @subpackage DifferenceEngine

Code

function process_chunk($chunk) {
  $processed = array();
  $j = 0;
  foreach ($chunk as $i => $piece) {
    $next = isset($chunk[$i + 1]) ? $chunk[$i + 1] : NULL;
    if (!isset($processed[$j])) {
      $processed[$j] = '';
    }
    if (strpos($piece, '<') === 0 && drupal_substr($piece, drupal_strlen($piece) - 1) === '>') {
      $processed[$j] = $piece;
      $j++;
    }
    elseif (isset($next) && strpos($next, '<') === 0 && drupal_substr($next, drupal_strlen($next) - 1) === '>') {
      $processed[$j] .= $piece;
      $j++;
    }
    else {
      $processed[$j] .= $piece;
    }
  }
  return $processed;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.