Closed JESUSrosetolife closed 8 months ago
Hmm. I think this issue may have been inspired by a real structuredPatch
bug that was fixed by https://github.com/kpdecker/jsdiff/pull/393, but the example code is broken; structuredPatch
's first two arguments are file names so you're passing arguments in the wrong positions.
At least with the code that exists on master now, if you correct it to
let structured = Diff.structuredPatch(file_name, file_name, a, b, header, header);
then applying the patch will work:
> console.log(Diff.applyPatch(a, structured))
b
This is my first time using this library
structuredPatch then applyPatch doesn't work; createPatch then parsePatch then applyPatch does:
Code:
Output:
I'm expecting
false
to beb