File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,13 @@ export function parsePatch(uniDiff, options = {}) {
99
1010 // Ignore any leading junk
1111 while ( i < diffstr . length ) {
12- if ( ( / ^ I n d e x : / . test ( diffstr [ i ] ) ) || ( / ^ @ @ / . test ( diffstr [ i ] ) ) ) {
12+ if ( / ^ ( I n d e x : | d i f f - r | @ @ ) / . test ( diffstr [ i ] ) ) {
1313 break ;
1414 }
1515 i ++ ;
1616 }
1717
18- let header = ( / ^ I n d e x : ( .* ) / . exec ( diffstr [ i ] ) ) ;
18+ let header = ( / ^ (?: I n d e x : | d i f f - r (?: \w + ) ) ( .* ) / . exec ( diffstr [ i ] ) ) ;
1919 if ( header ) {
2020 index . index = header [ 1 ] ;
2121 i ++ ;
@@ -35,7 +35,7 @@ export function parsePatch(uniDiff, options = {}) {
3535 index . hunks = [ ] ;
3636
3737 while ( i < diffstr . length ) {
38- if ( / ^ I n d e x : / . test ( diffstr [ i ] ) ) {
38+ if ( / ^ ( I n d e x : | d i f f - r ) / . test ( diffstr [ i ] ) ) {
3939 break ;
4040 } else if ( / ^ @ @ / . test ( diffstr [ i ] ) ) {
4141 index . hunks . push ( parseHunk ( ) ) ;
You can’t perform that action at this time.
0 commit comments