[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Convert/HTML.pm (_convert_row_type,
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Convert/HTML.pm (_convert_row_type, _convert_multitable_head_type), tp/init/html32.pm (html32_convert_row_type, html32_convert_multitable_head_type): add _convert_multitable_head_type() to convert multitable_head type, to thead, consistently with other formats, instead of doing the conversion in _convert_row_type(). |
Date: |
Thu, 16 Dec 2021 13:30:36 -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 143e204 * tp/Texinfo/Convert/HTML.pm (_convert_row_type,
_convert_multitable_head_type), tp/init/html32.pm (html32_convert_row_type,
html32_convert_multitable_head_type): add _convert_multitable_head_type() to
convert multitable_head type, to thead, consistently with other formats,
instead of doing the conversion in _convert_row_type().
143e204 is described below
commit 143e204f6aa0249d09dfca37c9f911aa31c83b2a
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Dec 16 19:30:22 2021 +0100
* tp/Texinfo/Convert/HTML.pm (_convert_row_type,
_convert_multitable_head_type), tp/init/html32.pm
(html32_convert_row_type, html32_convert_multitable_head_type):
add _convert_multitable_head_type() to convert multitable_head type,
to thead, consistently with other formats, instead of doing the
conversion in _convert_row_type().
---
ChangeLog | 9 +++++++++
tp/Texinfo/Convert/HTML.pm | 25 +++++++++++++++++++++----
tp/init/html32.pm | 6 +++---
3 files changed, 33 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index dc71ad0..27edb68 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2021-12-16 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Convert/HTML.pm (_convert_row_type,
+ _convert_multitable_head_type), tp/init/html32.pm
+ (html32_convert_row_type, html32_convert_multitable_head_type):
+ add _convert_multitable_head_type() to convert multitable_head type,
+ to thead, consistently with other formats, instead of doing the
+ conversion in _convert_row_type().
+
2021-12-07 Gavin Smith <gavinsmith0123@gmail.com>
* info/session.c (info_display_file_info): Add 1 to line number so
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 8de4f8a..3f51eb0 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -4309,18 +4309,35 @@ sub _convert_row_type($$$$) {
return $content if ($self->in_string());
if ($content =~ /\S/) {
+ my $result = '<tr>' . $content . '</tr>';
my $row_cmdname = $command->{'contents'}->[0]->{'cmdname'};
- if ($row_cmdname eq 'headitem') {
- return '<thead><tr>' . $content . '</tr></thead>' . "\n";
- } else {
- return '<tr>' . $content . '</tr>' . "\n";
+ if ($row_cmdname ne 'headitem') {
+ # if headitem, end of line added in _convert_multitable_head_type
+ $result .= "\n";
}
+ return $result;
} else {
return '';
}
}
$default_types_conversion{'row'} = \&_convert_row_type;
+sub _convert_multitable_head_type($$$$) {
+ my $self = shift;
+ my $type = shift;
+ my $command = shift;
+ my $content = shift;
+
+ return $content if ($self->in_string());
+ if ($content =~ /\S/) {
+ return '<thead>' . $content . '</thead>' . "\n";
+ } else {
+ return '';
+ }
+}
+
+$default_types_conversion{'multitable_head'} = \&_convert_multitable_head_type;
+
sub _convert_menu_entry_type($$$)
{
my $self = shift;
diff --git a/tp/init/html32.pm b/tp/init/html32.pm
index 18b4854..bc372ca 100644
--- a/tp/init/html32.pm
+++ b/tp/init/html32.pm
@@ -165,7 +165,7 @@ foreach my $explained_command
(keys(%Texinfo::Common::explained_commands)) {
}
# row in multitable. no thead in html 3.2
-sub html32_convert_row_type($$$$) {
+sub html32_convert_multitable_head_type($$$$) {
my $self = shift;
my $type = shift;
my $command = shift;
@@ -173,12 +173,12 @@ sub html32_convert_row_type($$$$) {
return $content if ($self->in_string());
if ($content =~ /\S/) {
- return '<tr>' . $content . '</tr>' . "\n";
+ return $content . "\n";
} else {
return '';
}
}
-texinfo_register_type_formatting('row', \&html32_convert_row_type);
+texinfo_register_type_formatting('multitable_head',
\&html32_convert_multitable_head_type);
sub html32_convert_tab_command ($$$$)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/HTML.pm (_convert_row_type, _convert_multitable_head_type), tp/init/html32.pm (html32_convert_row_type, html32_convert_multitable_head_type): add _convert_multitable_head_type() to convert multitable_head type, to thead, consistently with other formats, instead of doing the conversion in _convert_row_type().,
Patrice Dumas <=