You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Document and test ignoreWhiteSpace for createPatch
* Document and test newLineIsToken for createPatch.
I feel like this option is probably not that good since I supsect the patches it outputs doesn't really make any sense.
Copy file name to clipboardExpand all lines: README.md
+4-1
Original file line number
Diff line number
Diff line change
@@ -73,7 +73,10 @@ npm install diff --save
73
73
*`newStr` : New string value
74
74
*`oldHeader` : Additional information to include in the old file header
75
75
*`newHeader` : Additional information to include in the new file header
76
-
*`options` : An object with options. Currently, only `context` is supported and describes how many lines of context should be included.
76
+
*`options` : An object with options.
77
+
-`context` describes how many lines of context should be included.
78
+
-`ignoreWhitespace`: `true` to ignore leading and trailing whitespace.
79
+
-`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.
0 commit comments