Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line Delimiters Missing on Structured Patch #157

Closed
adstep opened this issue Dec 12, 2016 · 1 comment
Closed

Line Delimiters Missing on Structured Patch #157

adstep opened this issue Dec 12, 2016 · 1 comment

Comments

@adstep
Copy link

adstep commented Dec 12, 2016

let one = 'boop boop bleh\nasdf';
let other = 'bp boob blah\nfdsa';

let patch = jsdiff.createPatch('filename', one, other, 'oldheader', 'newheader');
let parsedPatch = jsdiff.parsePatch(patch);
let structuredPatch = jsdiff.structuredPatch('oldname', 'newname', one, other, 'oldheader', 'newheader');

// works
let patchedOther =  jsdiff.applyPatch(one, patch);

// works
let parsedPatchedOther = jsdiff.applyPatch(one, parsedPatch);

// Missing linedelimiters
let structuredPatchedOther = jsdiff.applyPatch(one, structuredPatch);

Throws an error on apply.js:108:43

@ExplodingCabbage
Copy link
Collaborator

Fixed by #393.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants