Add GROFF_NO_SGR=1 to w3mman2html.cgi for non-Debian groff

Bug-Debian: https://github.com/tats/w3m/pull/238
Bug-Debian: https://github.com/tats/w3m/issues/201
This commit is contained in:
Tatsuya Kinoshita
2023-01-16 06:08:57 +09:00
parent 7caad9ccf4
commit c4862fd9c1

View File

@@ -81,7 +81,7 @@ if ($query{"local"}) {
if (! ($file =~ /^\//)) { if (! ($file =~ /^\//)) {
$file = $query{"pwd"} . '/' . $file; $file = $query{"pwd"} . '/' . $file;
} }
open(F, "MAN_KEEP_FORMATTING=1 $MAN $file 2> /dev/null |"); open(F, "GROFF_NO_SGR=1 MAN_KEEP_FORMATTING=1 $MAN $file 2> /dev/null |");
} else { } else {
$man = $query{"man"}; $man = $query{"man"};
if ($man =~ s/\((\w+)\)$//) { if ($man =~ s/\((\w+)\)$//) {
@@ -97,7 +97,7 @@ if ($query{"local"}) {
$section =~ s:([^-\w\200-\377.,])::g; $section =~ s:([^-\w\200-\377.,])::g;
$man =~ s:([^-\w\200-\377.,])::g; $man =~ s:([^-\w\200-\377.,])::g;
open(F, "MAN_KEEP_FORMATTING=1 $MAN $section $man 2> /dev/null |"); open(F, "GROFF_NO_SGR=1 MAN_KEEP_FORMATTING=1 $MAN $section $man 2> /dev/null |");
} }
$ok = 0; $ok = 0;
undef $header; undef $header;