[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Convert/HTML.pm (_default_format_end
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Convert/HTML.pm (_default_format_end_file): use defined() to test if defined, not true value. |
Date: |
Sun, 19 Dec 2021 15:56:16 -0500 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new d6f45a4 * tp/Texinfo/Convert/HTML.pm (_default_format_end_file): use
defined() to test if defined, not true value.
d6f45a4 is described below
commit d6f45a488532960080cd7db8085653041845d86c
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Dec 19 21:56:07 2021 +0100
* tp/Texinfo/Convert/HTML.pm (_default_format_end_file): use
defined() to test if defined, not true value.
* tp/Texinfo/Convert/HTML.pm (_do_jslicenses_file): use
DOCTYPE from customization. Sort license files for reproducible
output.
---
ChangeLog | 9 +++++++++
tp/Texinfo/Convert/HTML.pm | 22 +++++++++++-----------
2 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 4be8104..d356194 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2021-12-19 Patrice Dumas <pertusus@free.fr>
+ * tp/Texinfo/Convert/HTML.pm (_default_format_end_file): use
+ defined() to test if defined, not true value.
+
+ * tp/Texinfo/Convert/HTML.pm (_do_jslicenses_file): use
+ DOCTYPE from customization. Sort license files for reproducible
+ output.
+
+2021-12-19 Patrice Dumas <pertusus@free.fr>
+
* doc/texinfo.texi (Other Customization Variables),
tp/Texinfo/Common.pm (@variable_string_settables),
tp/Texinfo/Convert/HTML.pm (close_html_lone_element_if_needed)
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 66e24f4..3f1d236 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -6889,15 +6889,15 @@ sub _default_format_end_file($)
my $pre_body_close = $self->get_conf('PRE_BODY_CLOSE');
$pre_body_close = '' if (!defined($pre_body_close));
- my $setting = $self->get_conf('JS_WEBLABELS');
- my $path = $self->get_conf('JS_WEBLABELS_FILE');
- if ($setting and $path
- and ($setting eq 'generate' or $setting eq 'reference')
+ my $js_setting = $self->get_conf('JS_WEBLABELS');
+ my $js_path = $self->get_conf('JS_WEBLABELS_FILE');
+ if (defined($js_setting) and defined($js_path)
+ and ($js_setting eq 'generate' or $js_setting eq 'reference')
and %{$self->{'jslicenses_element'}}) {
$pre_body_close .=
-"<a href='$path' rel='jslicense'><small>"
-.$self->convert_tree($self->gdt('JavaScript license information'))
-.'</small></a>';
+ "<a href='$js_path' rel='jslicense'><small>"
+ .$self->convert_tree($self->gdt('JavaScript license information'))
+ .'</small></a>';
}
return "${program_text}
@@ -7327,15 +7327,15 @@ sub _do_jslicenses_file {
# 'omit' - do nothing
return if (!$setting or $setting ne 'generate');
- my $a = '';
- $a .= '<!DOCTYPE html>
-<html><head><title>jslicense labels</title></head>
+ my $doctype = $self->get_conf('DOCTYPE');
+ my $a = $doctype . "\n" .
+'<html><head><title>jslicense labels</title></head>
<body>
<table id="jslicense-labels1">
';
my $h = $self->{'jslicenses'};
- for my $file (keys %{$self->{'jslicenses'}}) {
+ for my $file (sort(keys %{$self->{'jslicenses'}})) {
$a .= "<tr>\n";
$a .= "<td><a href=\"$file\">$file</a></td>\n";
$a .= "<td><a href=\"$h->{$file}->[1]\">$h->{$file}->[0]</a></td>\n";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/HTML.pm (_default_format_end_file): use defined() to test if defined, not true value.,
Patrice Dumas <=