[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Convert/Converter.pm (table_item_con
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Convert/Converter.pm (table_item_content_tree), tp/Texinfo/Convert/DocBook.pm, tp/Texinfo/Convert/HTML.pm, tp/Texinfo/Convert/Plaintext.pm: rename _table_item_content_tree() as table_item_content_tree(). |
Date: |
Sat, 11 Sep 2021 06:53:17 -0400 |
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 1487d45 * tp/Texinfo/Convert/Converter.pm (table_item_content_tree),
tp/Texinfo/Convert/DocBook.pm, tp/Texinfo/Convert/HTML.pm,
tp/Texinfo/Convert/Plaintext.pm: rename _table_item_content_tree() as
table_item_content_tree().
1487d45 is described below
commit 1487d455f40d1534e31265aaf57d94e7911b7909
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Sep 11 12:53:10 2021 +0200
* tp/Texinfo/Convert/Converter.pm (table_item_content_tree),
tp/Texinfo/Convert/DocBook.pm, tp/Texinfo/Convert/HTML.pm,
tp/Texinfo/Convert/Plaintext.pm: rename _table_item_content_tree()
as table_item_content_tree().
---
ChangeLog | 7 +++++++
tp/Texinfo/Convert/Converter.pm | 17 ++++++++++++-----
tp/Texinfo/Convert/DocBook.pm | 4 ++--
tp/Texinfo/Convert/HTML.pm | 5 ++---
tp/Texinfo/Convert/Plaintext.pm | 6 +++---
5 files changed, 26 insertions(+), 13 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 85862a0..3a90209 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2021-09-11 Patrice Dumas <pertusus@free.fr>
+ * tp/Texinfo/Convert/Converter.pm (table_item_content_tree),
+ tp/Texinfo/Convert/DocBook.pm, tp/Texinfo/Convert/HTML.pm,
+ tp/Texinfo/Convert/Plaintext.pm: rename _table_item_content_tree()
+ as table_item_content_tree().
+
+2021-09-11 Patrice Dumas <pertusus@free.fr>
+
* tp/Texinfo/Convert/Converter.pm (format_comment_or_return_end_line),
tp/Texinfo/Convert/TexinfoXML.pm, tp/Texinfo/Convert/DocBook.pm:
rename _end_line_or_comment() as format_comment_or_return_end_line().
diff --git a/tp/Texinfo/Convert/Converter.pm b/tp/Texinfo/Convert/Converter.pm
index 24817f9..cb411e7 100644
--- a/tp/Texinfo/Convert/Converter.pm
+++ b/tp/Texinfo/Convert/Converter.pm
@@ -1106,13 +1106,13 @@ sub format_comment_or_return_end_line($$)
return $end_line;
}
-sub _table_item_content_tree($$$)
+sub table_item_content_tree($$$)
{
my $self = shift;
my $element = shift;
my $contents = shift;
- my $converted_tree = {'parent' => $element};
+ my $table_item_tree = {'parent' => $element};
my $table_command = $element->{'parent'}->{'parent'}->{'parent'};
if ($table_command->{'extra'}
and $table_command->{'extra'}->{'command_as_argument'}) {
@@ -1120,7 +1120,7 @@ sub _table_item_content_tree($$$)
= $table_command->{'extra'}->{'command_as_argument'};
my $command = {'cmdname' => $command_as_argument->{'cmdname'},
'line_nr' => $element->{'line_nr'},
- 'parent' => $converted_tree };
+ 'parent' => $table_item_tree };
if ($command_as_argument->{'type'} eq 'definfoenclose_command') {
$command->{'type'} = $command_as_argument->{'type'};
$command->{'extra'}->{'begin'} =
$command_as_argument->{'extra'}->{'begin'};
@@ -1132,8 +1132,8 @@ sub _table_item_content_tree($$$)
$command->{'args'} = [$arg];
$contents = [$command];
}
- $converted_tree->{'contents'} = $contents;
- return $converted_tree;
+ $table_item_tree->{'contents'} = $contents;
+ return $table_item_tree;
}
sub _level_corrected_section($$)
@@ -1802,6 +1802,13 @@ I<$element>. The command associated to the tree element
should be
a command that sets some information, such as C<@documentlanguage>,
C<@contents> or C<@footnotestyle> for example.
+=item $table_item_tree = $converter->table_item_content_tree($element,
$contents)
+
+I<$element> should be an C<@item> or C<@itemx> tree element,
+I<$contents> should be corresponding texinfo tree contents.
+Returns a tree in which the @-command in argument of @*table
+of the I<$element> has been applied to I<$contents>.
+
=item $result = $converter->top_node_filename($document_name)
Returns a file name for the Top node file using either TOP_FILE
diff --git a/tp/Texinfo/Convert/DocBook.pm b/tp/Texinfo/Convert/DocBook.pm
index 7a11d60..26a1392 100644
--- a/tp/Texinfo/Convert/DocBook.pm
+++ b/tp/Texinfo/Convert/DocBook.pm
@@ -618,12 +618,12 @@ sub _convert($$;$)
and $element->{'parent'}->{'type'}
and $element->{'parent'}->{'type'} eq 'table_term') {
- my $converted_tree = $self->_table_item_content_tree($element,
+ my $table_item_tree = $self->table_item_content_tree($element,
$element->{'args'}->[0]->{'contents'});
$result .= "<term>";
$result .= $self->_index_entry($element);
- $result .= $self->_convert($converted_tree);
+ $result .= $self->_convert($table_item_tree);
chomp ($result);
$result .= "\n";
$result .= "</term>";
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index de89e60..e75a555 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -3323,12 +3323,11 @@ sub _convert_item_command($$$$)
}
} elsif ($command->{'parent'}->{'type'}
and $command->{'parent'}->{'type'} eq 'table_term') {
- # FIXME instead use the code of Plaintext or DocBook.
my $args = $content;
if ($args->[0]) {
- my $tree = $self->_table_item_content_tree($command,
+ my $table_item_tree = $self->table_item_content_tree($command,
[$args->[0]->{'tree'}]);
- my $result = $self->convert_tree ($tree);
+ my $result = $self->convert_tree($table_item_tree);
foreach my $command_name (reverse($self->commands_stack())) {
if ($preformatted_code_commands{$command_name}) {
$result = '<tt>' .$result. '</tt>';
diff --git a/tp/Texinfo/Convert/Plaintext.pm b/tp/Texinfo/Convert/Plaintext.pm
index 642e704..5aa69a2 100644
--- a/tp/Texinfo/Convert/Plaintext.pm
+++ b/tp/Texinfo/Convert/Plaintext.pm
@@ -2469,11 +2469,11 @@ sub _convert($$)
if ($element->{'args'} and @{$element->{'args'}}
and $element->{'args'}->[0]->{'contents'}) {
- my $converted_tree = $self->_table_item_content_tree($element,
+ my $table_item_tree = $self->table_item_content_tree($element,
$element->{'args'}->[0]->{'contents'});
- $converted_tree->{'type'} = 'frenchspacing';
- $result = $self->convert_line($converted_tree,
+ $table_item_tree->{'type'} = 'frenchspacing';
+ $result = $self->convert_line($table_item_tree,
{'indent_level'
=> $self->{'format_context'}->[-1]->{'indent_level'}
-1});
if ($result ne '') {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/Converter.pm (table_item_content_tree), tp/Texinfo/Convert/DocBook.pm, tp/Texinfo/Convert/HTML.pm, tp/Texinfo/Convert/Plaintext.pm: rename _table_item_content_tree() as table_item_content_tree().,
Patrice Dumas <=