-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fails to add newline after patch, fails to remove last character that needs to be removed #147
Comments
@stefanmatar it would be helpful if you provided the code you are using to get these results, especially showing the input values themselves and which functions you are calling with them. |
@dmsnell we were using patch_apply(patches, text1) → [text2, results] We moved over to the diff npm dependency in the meantime, as applied patches were not trustworthy. |
@stefanmatar I'm attempting to reproduce this but I'm having
I've tried all four combinations of both files with and without a trailing newline do you have |
aha, actually @stefanmatar I think the problem is the range in the post-patch file. try using this valid patch instead.
granted, I think |
@dmsnell I agree, some kind of aborting would be best! There should be some kind of exception thrown |
Given:
On file:
It returns
'A\nB\nXYZD\nE'
but should be'A\nB\nXYZ\nD'
The text was updated successfully, but these errors were encountered: