From 707fccc382c9e2c88ecd71818f214c9817d46be6 Mon Sep 17 00:00:00 2001 From: Mark Amery Date: Wed, 10 Jan 2024 19:25:20 +0000 Subject: [PATCH] Add note to README about setting `context` to Infinity or MAX_SAFE_INTEGER. (#473) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d5f98ecf..d21cc10a 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ Broadly, jsdiff's diff functions all take an old text and a new text and perform * `oldHeader` : Optional additional information to include in the old file header. Default: `undefined`. * `newHeader` : Optional additional information to include in the new file header. Default: `undefined`. * `options` : An object with options. - - `context` describes how many lines of context should be included. + - `context` describes how many lines of context should be included. You can set this to `Number.MAX_SAFE_INTEGER` or `Infinity` to include the entire file content in one hunk. - `ignoreWhitespace`: Same as in `diffLines`. Defaults to `false`. - `stripTrailingCr`: Same as in `diffLines`. Defaults to `false`. - `newlineIsToken`: Same as in `diffLines`. Defaults to `false`.