www/116479: cvsweb+enscript formatting bugfix

Matthew Mondor mmondor at pulsar-zone.net
Wed Sep 19 18:40:07 PDT 2007


>Number:         116479
>Category:       www
>Synopsis:       cvsweb+enscript formatting bugfix
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-www
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 20 01:40:06 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Matthew Mondor
>Release:        
>Organization:
Pulsar-Zone
>Environment:
>Description:
cvsweb used with enscript for code highlighting would not output the first tab of every line correctly, causing the first level to be badly indented, at least for the case where the code uses tabs rather than spaces.  The reason was that after the line number header no tab was found to realign the tabulator before the code line is displayed.
>How-To-Repeat:

>Fix:

@@ -3815,7 +3815,7 @@
   if ($linenumbers) {
     my $ln = 0;
     while (<ENSCRIPT_OUT>) {
-      printf '<a id="l%d" class="src">%5d: </a>', (++$ln) x 2;
+      printf qq{<a id="l%d" class="src">%5d:\t}, (++$ln) x 2;
       print $_;
     }
   } else {


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-www mailing list