You are here

function diff_normalise_text in Diff 7.3

A helper function to normalise system differences.

This handles differences in:

  • line endings: Mac, Windows and UNIX all use different line endings.
1 call to diff_normalise_text()
text_field_diff_view in includes/text.inc
Diff field callback for parsing text field comparative values.
1 string reference to 'diff_normalise_text'
diff_update_7304 in ./diff.install
Removes unused variable settings and merges inline diff block settings.

File

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

Code

function diff_normalise_text($text) {
  $text = str_replace(array(
    "\r\n",
    "\r",
  ), "\n", $text);
  return $text;
}