code2html-0.9.1-scalar.patch 1.4 KB

123456789101112131415161718192021
  1. --- code2html.orig 2002-01-12 22:17:02.000000000 +0100
  2. +++ code2html 2014-09-24 13:52:52.000000000 +0200
  3. @@ -1357,7 +1357,7 @@
  4. my @lines = split ( /\n/, $_[0] );
  5. my $nr = 0;
  6. - my $lengthofnr = length(@lines);
  7. + my $lengthofnr = length(scalar(@lines));
  8. my $format = qq{<a name="$_[1]line%u">%${lengthofnr}u</a> %s\n} ;
  9. join ('', map ( {$nr++; sprintf ( $format , $nr, $nr, $_ )} @lines));
  10. },
  11. @@ -1367,7 +1367,7 @@
  12. my @lines = split ( /\n/, $_[0] );
  13. my $nr = 0;
  14. - my $lengthofnr = length(@lines);
  15. + my $lengthofnr = length(scalar(@lines));
  16. my $format = qq{<a name="$_[1]line%u" href="#$_[1]line%u">%$ {lengthofnr}u</a> %s\n};
  17. join ('', map ( {$nr++; sprintf ( $format , $nr, $nr, $nr, $_ )} @lines));
  18. }