We already have a <pre> tag in ViewVCS, and nesting <pre>
inside the pre-existing <pre> overrides the "white-space:pre"
we use to align line numbers.
my $gen = $self->{$langpath} ||= do {
my $g = highlight::CodeGenerator::getInstance($highlight::HTML);
$g->setFragmentCode(1); # generate html fragment
- $g->setHTMLEnclosePreTag(1); # include <pre>
# whatever theme works
my $themepath = $dir->getThemePath('print.theme');
require File::Temp;
my $cmd = [ qw(w3m -T text/html -dump -config /dev/null) ];
my ($out, $err) = ('', '');
- IPC::Run::run($cmd, $ref, \$out, \$err);
+ IPC::Run::run($cmd, \('<pre>'.$$ref.'</pre>'), \$out, \$err);
# expand tabs and normalize whitespace,
# w3m doesn't preserve tabs
$orig =~ s/\t/ /gs;