File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -51,9 +51,8 @@ sub process_file
5151 $file =~ m / -(\d +)\. / ;
5252 my $major_version = $1 ;
5353
54- open (my $fh , ' <' , $file ) || die " could not open file %s : $! \n " , $file ;
55- open (my $tfh , ' >' , $tmpfile ) || die " could not open file %s : $! \n " ,
56- $tmpfile ;
54+ open (my $fh , ' <' , $file ) || die " could not open file $file : $! \n " ;
55+ open (my $tfh , ' >' , $tmpfile ) || die " could not open file $tmpfile : $! \n " ;
5756
5857 while (<$fh >)
5958 {
@@ -64,9 +63,9 @@ sub process_file
6463 # skip over commit links because we will add them below
6564 next
6665 if (!$in_comment &&
67- m { ^\s *<ulink url="&commit_baseurl;[\d a-f ]+">§</ulink>\s *$} );
66+ m { ^\s *<ulink url="&commit_baseurl;[[:xdigit:] ]+">§</ulink>\s *$} );
6867
69- if ($in_comment && m /\[ ([\d a-f ]+)\] / )
68+ if ($in_comment && m /\[ ([[:xdigit:] ]+)\] / )
7069 {
7170 my $hash = $1 ;
7271
@@ -88,23 +87,21 @@ sub process_file
8887 {
8988 for my $hash (@hashes )
9089 {
91- print ({$tfh }
92- " $prev_leading_space <ulink url=\" &commit_baseurl;$hash \" >§</ulink>\n "
93- );
90+ print $tfh
91+ " $prev_leading_space <ulink url=\" &commit_baseurl;$hash \" >§</ulink>\n " ;
9492 }
9593 @hashes = ();
9694 }
9795 else
9896 {
99- printf (
100- " hashes found but no matching text found for placement on line %s \n " ,
101- $lineno );
97+ print
98+ " hashes found but no matching text found for placement on line $lineno \n " ;
10299 exit (1);
103100 }
104101 }
105102 }
106103
107- print ({ $tfh } $_ ) ;
104+ print $tfh $_ ;
108105
109106 $prev_line_ended_with_paren = m /\)\s *$ / ;
110107
You can’t perform that action at this time.
0 commit comments