But also rips out the ability to pass newlineIsToken to createPatch et al, because my changes here broke the tests (that @oBusk had added in https://github.com/kpdecker/jsdiff/pull/345) for that feature and when I dug into it I realised - like I think @oBusk kinda implies in that PR description - that the whole feature is kinda broken, since it causes line ending changes to get falsely represented as deletions and insertions of entire blank lines in the patch.
(I suspect @Kiougar didn't consider the newlineIsToken option specifically back in 2016 when he wrote https://github.com/kpdecker/jsdiff/pull/153, and was probably thinking primarily about options like ignoreWhitespace which do make sense to pass to patch functions.)
Fixes https://github.com/kpdecker/jsdiff/issues/531.
But also rips out the ability to pass
newlineIsToken
tocreatePatch
et al, because my changes here broke the tests (that @oBusk had added in https://github.com/kpdecker/jsdiff/pull/345) for that feature and when I dug into it I realised - like I think @oBusk kinda implies in that PR description - that the whole feature is kinda broken, since it causes line ending changes to get falsely represented as deletions and insertions of entire blank lines in the patch.(I suspect @Kiougar didn't consider the
newlineIsToken
option specifically back in 2016 when he wrote https://github.com/kpdecker/jsdiff/pull/153, and was probably thinking primarily about options likeignoreWhitespace
which do make sense to pass to patch functions.)