You are here

function _diff_apply_markdown in Diff 7.3

Helper function to clear newlines from the content.

1 call to _diff_apply_markdown()
diff_markdown_state in ./diff.pages.inc
Helper function to render plain states from the corresponding raw state.

File

./diff.pages.inc, line 546
Menu callbacks for hook_menu().

Code

function _diff_apply_markdown($markdown, $items) {
  if (!$markdown) {
    return $items;
  }
  if (is_array($items)) {
    $items = array_map($markdown, $items);
    foreach ($items as &$item) {
      $item = trim($item, "\n");
    }
    return $items;
  }
  else {
    return trim($markdown($items), "\n");
  }
}