Closed
Description
Hi!
newlineIsToken is not documented for getStructuredPatch, so may be we need throw some exception for such case.
oldFile:
a
b
newFile:
a
c
d
b
I.e. added c\nd\n\n
The result is:
[
{
"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.
Metadata
Metadata
Assignees
Labels
No labels