summaryrefslogtreecommitdiff
path: root/app-text/code2html/files/code2html-0.9.1-scalar.patch
blob: b8f56f1a7d1a7c8792a38d8fbc72b5e33092053a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- a/code2html
+++ b/code2html
@@ -1357,7 +1357,7 @@
 								   my @lines = split ( /\n/, $_[0] );
 
                                                                    my $nr = 0;
-                                                                   my $lengthofnr = length(@lines);
+                                                                   my $lengthofnr = length(scalar(@lines));
                                                                    my $format = qq{<a name="$_[1]line%u">%${lengthofnr}u</a> %s\n} ;
 					                           join ('', map (  {$nr++; sprintf ( $format , $nr, $nr, $_ )} @lines));
 					                           },
@@ -1367,7 +1367,7 @@
 								   my @lines = split ( /\n/, $_[0] );
 
                                                                    my $nr = 0; 
-                                                                   my $lengthofnr = length(@lines);
+                                                                   my $lengthofnr = length(scalar(@lines));
                                                                    my $format = qq{<a name="$_[1]line%u" href="#$_[1]line%u">%$ {lengthofnr}u</a> %s\n};
                                                                    join ('', map (  {$nr++; sprintf ( $format , $nr, $nr, $nr, $_ )} @lines));
 					                           }