From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, HTML_MESSAGE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 1AB452141C for ; Sun, 27 Jan 2019 11:48:18 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 3/4] hlmod: disable enclosing
 tag
Date: Sun, 27 Jan 2019 11:48:16 +0000
Message-Id: <20190127114817.14486-4-e@80x24.org>
In-Reply-To: <20190127114817.14486-1-e@80x24.org>
References: <20190127114817.14486-1-e@80x24.org>
List-Id: 

We already have a 
 tag in ViewVCS, and nesting 
inside the pre-existing 
 overrides the "white-space:pre"
we use to align line numbers.
---
 lib/PublicInbox/HlMod.pm | 1 -
 t/hl_mod.t               | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/PublicInbox/HlMod.pm b/lib/PublicInbox/HlMod.pm
index 5cbfb29..237ffac 100644
--- a/lib/PublicInbox/HlMod.pm
+++ b/lib/PublicInbox/HlMod.pm
@@ -99,7 +99,6 @@ sub do_hl {
 	my $gen = $self->{$langpath} ||= do {
 		my $g = highlight::CodeGenerator::getInstance($highlight::HTML);
 		$g->setFragmentCode(1); # generate html fragment
-		$g->setHTMLEnclosePreTag(1); # include 
 
 		# whatever theme works
 		my $themepath = $dir->getThemePath('print.theme');
diff --git a/t/hl_mod.t b/t/hl_mod.t
index 62cc624..80f8890 100644
--- a/t/hl_mod.t
+++ b/t/hl_mod.t
@@ -27,7 +27,7 @@ my $orig = $str;
 		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, \('
'.$$ref.'
'), \$out, \$err); # expand tabs and normalize whitespace, # w3m doesn't preserve tabs $orig =~ s/\t/ /gs; -- EW