Skip to content

Commit

Permalink
Tooling: Lenient formatting of line diff marker
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth committed Oct 12, 2018
1 parent ba495f4 commit 742a376
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/process-git-diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

const hasNonOptionalDiff = !! ( process.argv[ 2 ] || '' )
// Strip individual diffs of optional-only.
.replace( /@@ -\d+ \+\d+,\d+ @@\n(-.+\n\+.+,\n)?\+.+\"optional\": true,?\n/gm, '' )
.replace( /@@ .+ @@\n(-.+\n\+.+,\n)?\+.+\"optional\": true,?\n/gm, '' )
// If no more line diffs remain after above, remove diff heading for file.
.replace( /diff --git a\/package-lock.json b\/package-lock.json\nindex \w+..\w+ \d+\n--- a\/package-lock.json\n\+\+\+ b\/package-lock.json\n(?!@@)/, '' );

Expand Down

0 comments on commit 742a376

Please sign in to comment.