You are here

function diff_get_inline in Diff 7.2

Same name and namespace in other branches
  1. 6.2 diff.module \diff_get_inline()
  2. 7.3 diff.module \diff_get_inline()

Render a diff of two strings into HTML markup indicating additions, changes and deletions.

Parameters

string $a: The source string to compare from.

string $b: The target string to compare to.

Return value

String containing HTML markup.

1 call to diff_get_inline()
diff_inline_show in ./diff.pages.inc
Show the inline diff for a given node, vid. If vid = 0 or no previous vid exists for the given revision returns the normally rendered content of the specified revision.

File

./diff.module, line 306
Provides functionality to show a diff between two node revisions.

Code

function diff_get_inline($a, $b) {
  module_load_include('php', 'diff', 'DiffEngine');
  $diff = new DrupalDiffInline($a, $b);
  return $diff
    ->render();
}