Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 15796f7

Browse files
committed
do_cmd_textohtmlinfopage(): Rip out most of the boilerplate and move
it to the about.dat file. Only what really needs to be generated is, and the remainder is easier to maintain than Perl code.
1 parent d83c8bd commit 15796f7

1 file changed

Lines changed: 13 additions & 12 deletions

File tree

Doc/perl/l2hinit.perl

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -304,19 +304,20 @@ sub do_cmd_textohtmlinfopage {
304304
if ($INFO) { #
305305
anchor_label("about",$CURRENT_FILE,$_); # this is added
306306
} #
307-
( ($INFO == 1)
308-
? join('', $close_all
309-
, "<STRONG>$t_title</STRONG><P>\nThis document was generated using the\n"
310-
, "<A HREF=\"$TEX2HTMLADDRESS\"><STRONG>LaTeX</STRONG>2<tt>HTML</tt></A>"
311-
, " translator Version $TEX2HTMLVERSION\n"
312-
, "<P>Copyright &#169; 1993, 1994, 1995, 1996, 1997,\n"
313-
, "<A HREF=\"$AUTHORADDRESS\">Nikos Drakos</A>, \n"
314-
, "Computer Based Learning Unit, University of Leeds.\n"
315-
, "<P>The command line arguments were: <BR>\n "
316-
, "<STRONG>latex2html</STRONG> <tt>$argv</tt>.\n"
317-
, "<P>The translation was initiated by $address_data[0] on $address_data[1]"
307+
my $the_version = ''; # and the rest is
308+
if ($t_date) { # mostly ours
309+
$the_version = ",\n$t_date";
310+
if ($PYTHON_VERSION) {
311+
$the_version .= ", Release $PYTHON_VERSION";
312+
}
313+
}
314+
$_ = (($INFO == 1)
315+
? join('', $close_all
316+
, "<strong>$t_title</strong>$the_version\n"
317+
, `cat $myrootdir${dd}html${dd}about.dat`
318318
, $open_all, $_)
319-
: join('', $close_all, $INFO,"\n", $open_all, $_))
319+
: join('', $close_all, $INFO,"\n", $open_all, $_));
320+
$_;
320321
}
321322

322323
# $idx_mark will be replaced with the real index at the end

0 commit comments

Comments
 (0)