Skip to content

Commit 9b1bd6b

Browse files
committed
Update documentation for createPatch
1 parent f1b1feb commit 9b1bd6b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ npm install diff --save
8383
- `context` describes how many lines of context should be included.
8484
- `ignoreWhitespace`: `true` to ignore leading and trailing whitespace.
8585
- `newlineIsToken`: `true` to treat newline characters as separate tokens. This allows for changes to the newline structure to occur independently of the line content and to be treated as such. In general this is the more human friendly form of `diffLines` and `diffLines` is better suited for patches and other computer friendly output.
86+
- `stripTrailingCr`: `true` to remove all trailing CR (`\r`) characters before perfoming the diff.
87+
This helps to get a useful diff when comparing files from UNIX/Windows respectively.
8688

8789
* `Diff.createPatch(fileName, oldStr, newStr, oldHeader, newHeader)` - creates a unified diff patch.
8890

0 commit comments

Comments
 (0)