File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ function parsePatch(patch: string): DiffHunk[] {
194
194
}
195
195
196
196
export function getModifiedContentFromDiffHunk ( originalContent , patch ) {
197
- let left = originalContent . split ( / \r | \n | \r \n / ) ;
197
+ let left = originalContent . split ( / \r ? \n / ) ;
198
198
let diffHunkReader = parseDiffHunk ( patch ) ;
199
199
let diffHunkIter = diffHunkReader . next ( ) ;
200
200
let diffHunks = [ ] ;
Original file line number Diff line number Diff line change @@ -237,7 +237,7 @@ export class Repository {
237
237
return [ ] ;
238
238
}
239
239
240
- return result . stdout . trimRight ( ) . split ( / \r | \n | \r \n / ) . map ( branchName => {
240
+ return result . stdout . trimRight ( ) . split ( / \r ? \n / ) . map ( branchName => {
241
241
return branchName . substr ( 2 ) ;
242
242
} ) ;
243
243
}
You can’t perform that action at this time.
0 commit comments