You are here

function theme_diff_inline_chunk in Diff 6.2

Same name and namespace in other branches
  1. 7.3 diff.theme.inc \theme_diff_inline_chunk()
  2. 7.2 diff.theme.inc \theme_diff_inline_chunk()

Theme a span of changed text in an inline diff display.

2 theme calls to theme_diff_inline_chunk()
DrupalDiffInline::render in ./DiffEngine.php
Render differences inline using HTML markup.
theme_diff_inline_metadata in ./diff.theme.inc
Display inline diff metadata.

File

./diff.theme.inc, line 306
Themeable function callbacks for diff.module.

Code

function theme_diff_inline_chunk($text, $type = NULL) {
  switch ($type) {
    case 'add':
      return "<span class='diff-added'>{$text}</span>";
    case 'change':
      return "<span class='diff-changed'>{$text}</span>";
    case 'delete':
      return "<span class='diff-deleted'>{$text}</span>";
    default:
      return $text;
  }
}