Skip to content

Commit 29a8889

Browse files
author
Scott Baker
committed
Handle both filename.txt and a/filename.txt
1 parent 286ce59 commit 29a8889

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libs/header_clean/header_clean.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
#########################
2424
# Look for the filename #
2525
#########################
26-
if ($line =~ /^${ansi_sequence_regex}diff --git a\/(.+?) b\/(.+)/) {
26+
if ($line =~ /^${ansi_sequence_regex}diff --git (.+?) /) {
2727
$last_file_seen = $4;
28+
$last_file_seen =~ s|a/||; # Remove a/
2829
########################################
2930
# Find the first file: --- a/README.md #
3031
########################################

0 commit comments

Comments
 (0)