[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Sun, 30 Jan 2022 18:51:22 -0500 (EST) |
branch: master
commit 193abd3af294930a80b9415b0b39c16d5550f050
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon Jan 31 00:51:09 2022 +0100
* tp/Texinfo/Convert/HTML.pm (command_conversion, type_conversion)
(_convert_item_command), tp/init/html32.pm:
add accessors to 'commands_conversion' and 'types_conversion'.
* tp/Texinfo/Convert/HTML.pm (default_type_conversion)
(default_type_open), tp/init/epub3.pm: rename default_types_conversion as
default_type_conversion and default_types_open as default_type_open.
---
ChangeLog | 10 ++++++++++
tp/Texinfo/Convert/HTML.pm | 21 ++++++++++++++++++---
tp/init/epub3.pm | 4 ++--
tp/init/html32.pm | 3 ++-
tp/t/init/mini_ker_t2h.init | 12 ++++++------
5 files changed, 38 insertions(+), 12 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 45f777d2e6..fe6ce1d6f4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2022-01-31 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Convert/HTML.pm (command_conversion, type_conversion)
+ (_convert_item_command), tp/init/html32.pm:
+ add accessors to 'commands_conversion' and 'types_conversion'.
+
+ * tp/Texinfo/Convert/HTML.pm (default_type_conversion)
+ (default_type_open), tp/init/epub3.pm: rename default_types_conversion
as
+ default_type_conversion and default_types_open as default_type_open.
+
2022-01-30 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Convert/HTML.pm (_convert_*_command, _convert),
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index e2c852464e..2ebf06815d 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -1332,6 +1332,13 @@ sub default_command_conversion($$)
return $default_commands_conversion{$command};
}
+sub command_conversion($$)
+{
+ my $self = shift;
+ my $command = shift;
+ return $self->{'commands_conversion'}->{$command};
+}
+
my %default_commands_open;
sub default_command_open($$)
@@ -4538,7 +4545,8 @@ sub _convert_item_command($$$$$)
}
} elsif ($command->{'parent'}->{'type'}
and $command->{'parent'}->{'type'} eq 'row') {
- return $self->_convert_tab_command($cmdname, $command, $args, $content);
+ return &{$self->command_conversion('tab')}($self, $cmdname, $command,
+ $args, $content);
}
return '';
}
@@ -5166,16 +5174,23 @@ foreach my $small_command
(keys(%small_block_associated_command)) {
# Texinfo::Config::texinfo_register_type_formatting()
my %default_types_conversion;
-sub default_types_conversion($$)
+sub default_type_conversion($$)
{
my $self = shift;
my $type = shift;
return $default_types_conversion{$type};
}
+sub type_conversion($$)
+{
+ my $self = shift;
+ my $type = shift;
+ return $self->{'types_conversion'}->{$type};
+}
+
my %default_types_open;
-sub default_types_open($$)
+sub default_type_open($$)
{
my $self = shift;
my $type = shift;
diff --git a/tp/init/epub3.pm b/tp/init/epub3.pm
index dcac313a1b..58a7a06a9d 100644
--- a/tp/init/epub3.pm
+++ b/tp/init/epub3.pm
@@ -133,7 +133,7 @@ sub epub_noop($$)
# file scope variables
my $epub_destination_directory;
-my $epub_document_destination_directory;
+my $epub_document_destination_directory;
my $epub_document_dir_name = 'EPUB';
@@ -196,7 +196,7 @@ sub epub_convert_tree_unit_type($$$$)
my $content = shift;
push @epub_output_filenames, $element->{'structure'}->{'unit_filename'};
- return &{$self->default_types_conversion($type)}($self,
+ return &{$self->default_type_conversion($type)}($self,
$type, $element, $content);
}
diff --git a/tp/init/html32.pm b/tp/init/html32.pm
index 904bcac366..0b09175418 100644
--- a/tp/init/html32.pm
+++ b/tp/init/html32.pm
@@ -286,7 +286,8 @@ sub html32_convert_item_command($$$$$)
}
if ($command->{'parent'}->{'type'}
and $command->{'parent'}->{'type'} eq 'row') {
- return html32_convert_tab_command($self, $cmdname, $command, $args,
$content);
+ return &{$self->command_conversion('tab')}($self, $cmdname, $command,
+ $args, $content);
} elsif ($command->{'parent'}->{'cmdname'}
and $command->{'parent'}->{'cmdname'} eq 'itemize') {
my $prepend ;
diff --git a/tp/t/init/mini_ker_t2h.init b/tp/t/init/mini_ker_t2h.init
index 7d0714db74..5ccfbd4a9e 100644
--- a/tp/t/init/mini_ker_t2h.init
+++ b/tp/t/init/mini_ker_t2h.init
@@ -4,13 +4,13 @@ sub mini_ker_element_type($$$$)
{
my $self = shift;
my $type = shift;
- my $command = shift;
+ my $element = shift;
my $content = shift;
- if ($self->element_is_tree_unit_top($command)) {
+ if ($self->element_is_tree_unit_top($element)) {
my $result = '';
$result .= &{$self->formatting_function('format_navigation_header')}($self,
- $self->get_conf('MISC_BUTTONS'), $type, $command)
+ $self->get_conf('MISC_BUTTONS'), $type, $element)
if ($self->get_conf('SPLIT') or $self->get_conf('HEADERS'));
$result .= &{$self->formatting_function('format_titlepage')}($self);
my $overview = &{$self->formatting_function('format_contents')}($self,
@@ -22,11 +22,11 @@ sub mini_ker_element_type($$$$)
$result .= "</blockquote>\n";
}
$result .=
&{$self->default_formatting_function('format_element_footer')}($self,
- $type, $command, $content);
+ $type, $element, $content);
return $result;
} else {
- return &{$self->default_types_conversion($type)}($self,
- $type, $command, $content);
+ return &{$self->default_type_conversion($type)}($self,
+ $type, $element, $content);
}
}