newlineIsToken is not documented for getStructuredPatch, so may be we need throw some exception for such case.
I.e. added c\nd\n\n
[
{
"oldStart": 3,
"oldLines": 0,
"newStart": 3,
"newLines": 1,
"lines": [
"+c"
]
},
{
"oldStart": 4,
"oldLines": 0,
"newStart": 5,
"newLines": 3,
"lines": [
"+d",
"+",
"+"
]
}
]
So there is an error either in the first chunk, because newline is lost,
or in the second chunk, because there is wrong redundant newline.
Hi!
newlineIsToken is not documented for getStructuredPatch, so may be we need throw some exception for such case.
oldFile:
newFile:
I.e. added c\nd\n\n
The result is: