You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Funny, I encountered a similar case a few days ago.
In my case there was another diff starting right after.
I think this is a bug that happens when you have an empty line inside a hunk's content, and no new line before the next diff. the parser assumes there would be an empty line before the next diff, which is not the case.
As a workaround, adding an empty line before each new diff helped (append(System.lineSeparator())).
Funny, I encountered a similar case a few days ago.
In my case there was another diff starting right after.
I think this is a bug that happens when you have an empty line inside a hunk's content, and no new line before the next diff. the parser assumes there would be an empty line before the next diff, which is not the case.
As a workaround, adding an empty line before each new diff helped (append(System.lineSeparator())).
Yes, you are right. But I have a large data set of diff files so I don't want to modify them, though I have also tried your workaround and it worked. 😅
I have tried to trace the route cause and I think the route cause is here. I added an additional condition and solved my issue, but I don't know if it is a good solution.
Activity
ayeletlevron commentedon Mar 27, 2020
Funny, I encountered a similar case a few days ago.
In my case there was another diff starting right after.
I think this is a bug that happens when you have an empty line inside a hunk's content, and no new line before the next diff. the parser assumes there would be an empty line before the next diff, which is not the case.
As a workaround, adding an empty line before each new diff helped (append(System.lineSeparator())).
mrdrivingduck commentedon Mar 28, 2020
Yes, you are right. But I have a large data set of diff files so I don't want to modify them, though I have also tried your workaround and it worked. 😅
I have tried to trace the route cause and I think the route cause is here. I added an additional condition and solved my issue, but I don't know if it is a good solution.
ayeletlevron commentedon Mar 29, 2020
Yes, I got to the same root cause when I traced the issue. I had to find a workaround without changing the library..