File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -110,19 +110,21 @@ export async function runPrettier(
110110 "diff" ,
111111 alternative . version . kind ,
112112 original . version . kind ,
113- `--src-prefix=Original |${ fileLinkPrefix } ` ,
114- `--dst-prefix=Alternative |` ,
113+ `--src-prefix=${ original . version . kind } |${ fileLinkPrefix } ` ,
114+ `--dst-prefix=${ alternative . version . kind } |` ,
115115 ] ,
116116 { cwd : directory } ,
117117 ) ;
118118
119119 const lines = diff . split ( "\n" ) ;
120120 for ( let lineIndex = lines . length - 1 ; lineIndex >= 0 ; lineIndex -- ) {
121121 if (
122- lines [ lineIndex ] . startsWith ( " diff --git Original|" ) &&
122+ lines [ lineIndex ] . startsWith ( ` diff --git ${ original . version . kind } |` ) &&
123123 lines [ lineIndex + 1 ] . startsWith ( "index " ) &&
124- lines [ lineIndex + 2 ] . startsWith ( "--- Original|http://github.com/" ) &&
125- lines [ lineIndex + 3 ] . startsWith ( "+++ Alternative|" )
124+ lines [ lineIndex + 2 ] . startsWith (
125+ `--- ${ original . version . kind } |http://github.com/` ,
126+ ) &&
127+ lines [ lineIndex + 3 ] . startsWith ( `+++ ${ alternative . version . kind } |` )
126128 ) {
127129 // Remove the useless head
128130 lines . splice ( lineIndex , 2 ) ;
You can’t perform that action at this time.
0 commit comments