[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 $self->get_info to retrieve 'jslicenses' information. |
Date: |
Sun, 30 Jan 2022 19:01:56 -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 a7ec443f84 * tp/Texinfo/Convert/HTML.pm (_default_format_end_file):
use $self->get_info to retrieve 'jslicenses' information.
a7ec443f84 is described below
commit a7ec443f844eafbee8f215387c5a368644a04a6d
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon Jan 31 01:01:43 2022 +0100
* tp/Texinfo/Convert/HTML.pm (_default_format_end_file): use
$self->get_info to retrieve 'jslicenses' information.
* tp/Texinfo/Convert/HTML.pm (output): set 'jslicenses' earlier.
---
ChangeLog | 7 ++++++
tp/Texinfo/Convert/HTML.pm | 55 +++++++++++++++++++++++-----------------------
2 files changed, 35 insertions(+), 27 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index fe6ce1d6f4..17ca1ace0a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-01-31 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Convert/HTML.pm (_default_format_end_file): use
+ $self->get_info to retrieve 'jslicenses' information.
+
+ * tp/Texinfo/Convert/HTML.pm (output): set 'jslicenses' earlier.
+
2022-01-31 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Convert/HTML.pm (command_conversion, type_conversion)
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 2ebf06815d..5eb532df1e 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -8372,11 +8372,12 @@ sub _default_format_end_file($$)
my $pre_body_close = $self->get_conf('PRE_BODY_CLOSE');
$pre_body_close = '' if (!defined($pre_body_close));
- if ($self->{'jslicenses'}
- and (scalar(keys %{$self->{'jslicenses'}->{'infojs'}})
+ my $jslicenses = $self->get_info('jslicenses');
+ if ($jslicenses
+ and (scalar(keys %{$jslicenses->{'infojs'}})
or (($self->get_file_information('mathjax', $filename)
or !$self->get_conf('SPLIT'))
- and scalar(keys %{$self->{'jslicenses'}->{'mathjax'}})))) {
+ and scalar(keys %{$jslicenses->{'mathjax'}})))) {
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)
@@ -9236,6 +9237,30 @@ sub output($$)
my $setup_status = $self->run_stage_handlers($root, 'setup');
return undef unless($setup_status);
+ if ($self->get_conf('HTML_MATH')
+ and $self->get_conf('HTML_MATH') eq 'mathjax') {
+ # See https://www.gnu.org/licenses/javascript-labels.html
+
+ my $mathjax_script = $self->get_conf('MATHJAX_SCRIPT');
+ my $mathjax_source = $self->get_conf('MATHJAX_SOURCE');
+
+ $self->{'jslicenses'}->{'mathjax'} = {
+ $mathjax_script =>
+ [ 'Apache License, Version 2.0.',
+ 'https://www.apache.org/licenses/LICENSE-2.0',
+ $mathjax_source ]};
+ }
+ if ($self->get_conf('INFO_JS_DIR')) {
+ $self->{'jslicenses'}->{'infojs'} = {
+ 'js/info.js' =>
+ [ 'GNU General Public License 3.0 or later',
+ 'http://www.gnu.org/licenses/gpl-3.0.html',
+ 'js/info.js' ],
+ 'js/modernizr.js' =>
+ [ 'Expat',
+ 'http://www.jclark.com/xml/copying.txt',
+ 'js/modernizr.js' ]};
+ }
$self->_prepare_css();
# this sets OUTFILE, to be used if not split, but also
@@ -9419,30 +9444,6 @@ sub output($$)
return undef if (!$status);
}
- if ($self->get_conf('HTML_MATH')
- and $self->get_conf('HTML_MATH') eq 'mathjax') {
- # See https://www.gnu.org/licenses/javascript-labels.html
-
- my $mathjax_script = $self->get_conf('MATHJAX_SCRIPT');
- my $mathjax_source = $self->get_conf('MATHJAX_SOURCE');
-
- $self->{'jslicenses'}->{'mathjax'} = {
- $mathjax_script =>
- [ 'Apache License, Version 2.0.',
- 'https://www.apache.org/licenses/LICENSE-2.0',
- $mathjax_source ]};
- }
- if ($self->get_conf('INFO_JS_DIR')) {
- $self->{'jslicenses'}->{'infojs'} = {
- 'js/info.js' =>
- [ 'GNU General Public License 3.0 or later',
- 'http://www.gnu.org/licenses/gpl-3.0.html',
- 'js/info.js' ],
- 'js/modernizr.js' =>
- [ 'Expat',
- 'http://www.jclark.com/xml/copying.txt',
- 'js/modernizr.js' ]};
- }
# all the informations should be available
$self->_reset_infos();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/HTML.pm (_default_format_end_file): use $self->get_info to retrieve 'jslicenses' information.,
Patrice Dumas <=