Fix mkheaders on files with Windows line endings.

This commit is contained in:
Sadie Powell 2023-07-15 09:01:59 +01:00
parent c9a30a5acf
commit 84a3acc0d6

View File

@ -87,7 +87,7 @@ for my $path (@paths) {
for my $line (<$fh>) {
$linenum += 1;
chomp $line;
if ($line =~ /^([^0-9A-Za-z]+\s)Copyright\s+\(C\)\s+[^<]+(\s+<[^>]+>)?$/) {
if ($line =~ /^([^0-9A-Za-z]+\s)Copyright\s+\(C\)\s+[^<]+(\s+<[^>]+>)?[\r\s]*$/) {
$copyright = scalar @lines;
$indent = $1;
} else {