[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Convert/Converter.pm, tp/Texinfo/Con
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Convert/Converter.pm, tp/Texinfo/Convert/IXIN.pm, tp/Texinfo/Convert/NodeNameNormalization.pm, tp/Texinfo/Convert/TexinfoSXML.pm, tp/Texinfo/Convert/Text.pm, tp/Texinfo/Convert/TextContent.pm: rename $root as $element if not a root element and $elements as $tree_units if only for tree_units. |
Date: |
Wed, 08 Sep 2021 10:38:34 -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 71c272f * tp/Texinfo/Convert/Converter.pm,
tp/Texinfo/Convert/IXIN.pm, tp/Texinfo/Convert/NodeNameNormalization.pm,
tp/Texinfo/Convert/TexinfoSXML.pm, tp/Texinfo/Convert/Text.pm,
tp/Texinfo/Convert/TextContent.pm: rename $root as $element if not a root
element and $elements as $tree_units if only for tree_units.
71c272f is described below
commit 71c272f499de62c745d786f32cd89391e4759a2f
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Sep 8 16:38:27 2021 +0200
* tp/Texinfo/Convert/Converter.pm, tp/Texinfo/Convert/IXIN.pm,
tp/Texinfo/Convert/NodeNameNormalization.pm,
tp/Texinfo/Convert/TexinfoSXML.pm, tp/Texinfo/Convert/Text.pm,
tp/Texinfo/Convert/TextContent.pm: rename $root as $element if not
a root element and $elements as $tree_units if only for tree_units.
---
ChangeLog | 8 +
tp/Texinfo/Convert/Converter.pm | 98 +++++-----
tp/Texinfo/Convert/IXIN.pm | 6 +-
tp/Texinfo/Convert/NodeNameNormalization.pm | 78 ++++----
tp/Texinfo/Convert/TexinfoSXML.pm | 6 +-
tp/Texinfo/Convert/Text.pm | 268 ++++++++++++++--------------
tp/Texinfo/Convert/TextContent.pm | 78 ++++----
7 files changed, 275 insertions(+), 267 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 532cdca..a683612 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2021-09-08 Patrice Dumas <pertusus@free.fr>
+ * tp/Texinfo/Convert/Converter.pm, tp/Texinfo/Convert/IXIN.pm,
+ tp/Texinfo/Convert/NodeNameNormalization.pm,
+ tp/Texinfo/Convert/TexinfoSXML.pm, tp/Texinfo/Convert/Text.pm,
+ tp/Texinfo/Convert/TextContent.pm: rename $root as $element if not
+ a root element and $elements as $tree_units if only for tree_units.
+
+2021-09-08 Patrice Dumas <pertusus@free.fr>
+
* Texinfo/Structuring.pm (elements_directions): create directions only
if pointing to other 'unit' elements.
diff --git a/tp/Texinfo/Convert/Converter.pm b/tp/Texinfo/Convert/Converter.pm
index 54dced0..a7670ec 100644
--- a/tp/Texinfo/Convert/Converter.pm
+++ b/tp/Texinfo/Convert/Converter.pm
@@ -112,17 +112,17 @@ sub output_internal_links($)
sub _informative_command_value($$)
{
my $self = shift;
- my $root = shift;
+ my $element = shift;
- my $cmdname = $root->{'cmdname'};
+ my $cmdname = $element->{'cmdname'};
if ($Texinfo::Common::misc_commands{$cmdname} eq 'skipline') {
return 1;
- } elsif (exists($root->{'extra'}->{'text_arg'})) {
- return $root->{'extra'}->{'text_arg'};
- } elsif ($root->{'extra'} and $root->{'extra'}->{'misc_args'}
- and exists($root->{'extra'}->{'misc_args'}->[0])) {
- return $root->{'extra'}->{'misc_args'}->[0];
+ } elsif (exists($element->{'extra'}->{'text_arg'})) {
+ return $element->{'extra'}->{'text_arg'};
+ } elsif ($element->{'extra'} and $element->{'extra'}->{'misc_args'}
+ and exists($element->{'extra'}->{'misc_args'}->[0])) {
+ return $element->{'extra'}->{'misc_args'}->[0];
}
return undef;
}
@@ -133,12 +133,12 @@ sub _informative_command_value($$)
sub set_informative_command_value($$)
{
my $self = shift;
- my $root = shift;
+ my $element = shift;
- my $cmdname = $root->{'cmdname'};
+ my $cmdname = $element->{'cmdname'};
$cmdname = 'shortcontents' if ($cmdname eq 'summarycontents');
- my $value = $self->_informative_command_value($root);
+ my $value = $self->_informative_command_value($element);
if (defined($value)) {
$self->set_conf($cmdname, $value);
}
@@ -296,7 +296,7 @@ sub set_global_document_commands($$;$)
}
} else {
foreach my $global_command (@{$selected_commands}) {
- my $root;
+ my $element;
if (defined($self->{'global_commands'}->{$global_command})
and ref($self->{'global_commands'}->{$global_command}) eq 'ARRAY') {
# used when $commands_location == 1
@@ -304,17 +304,17 @@ sub set_global_document_commands($$;$)
if ($commands_location < 0) {
$index_in_global_commands = -1;
}
- $root =
+ $element =
$self->{'global_commands'}->{$global_command}->[$index_in_global_commands];
} elsif (defined($self->{'global_commands'}->{$global_command})) {
# unique command, first and last are the same
- $root = $self->{'global_commands'}->{$global_command};
+ $element = $self->{'global_commands'}->{$global_command};
}
if ($self->get_conf('DEBUG')) {
print STDERR "SET_global_multiple_commands($commands_location)
$global_command\n";
}
- if (defined($root)) {
- $self->set_informative_command_value($root);
+ if (defined($element)) {
+ $self->set_informative_command_value($element);
} else {
# commands not appearing in the document, this should set the
# same value, the converter initialization value
@@ -600,7 +600,7 @@ sub top_node_filename($$)
return $top_node_filename;
}
-sub _get_element($$)
+sub _get_root_element($$)
{
my $self = shift;
my $command = shift;
@@ -653,7 +653,7 @@ sub _set_tree_units_files($$$$$$)
my $top_node_filename = $self->top_node_filename($document_name);
# first determine the top node file name.
if ($node_top and defined($top_node_filename)) {
- my ($node_top_unit) = $self->_get_element($node_top);
+ my ($node_top_unit) = $self->_get_root_element($node_top);
die "BUG: No element for top node" if (!defined($node_top));
$self->set_tree_unit_file($node_top_unit, $top_node_filename,
$destination_directory);
@@ -958,7 +958,7 @@ sub create_destination_directory($$)
sub txt_image_text($$$)
{
- my ($self, $root, $basefile) = @_;
+ my ($self, $element, $basefile) = @_;
my $txt_file = Texinfo::Common::locate_include_file($self, $basefile.'.txt');
if (!defined($txt_file)) {
@@ -966,7 +966,7 @@ sub txt_image_text($$$)
} else {
my $filehandle = do { local *FH };
if (open ($filehandle, $txt_file)) {
- my $enc = $root->{'extra'}->{'input_perl_encoding'};
+ my $enc = $element->{'extra'}->{'input_perl_encoding'};
binmode($filehandle, ":encoding($enc)")
if ($enc);
my $result = '';
@@ -989,7 +989,7 @@ sub txt_image_text($$$)
} else {
$self->line_warn($self,
sprintf(__("\@image file `%s' unreadable: %s"),
- $txt_file, $!), $root->{'line_nr'});
+ $txt_file, $!), $element->{'line_nr'});
}
}
return undef;
@@ -1027,13 +1027,13 @@ sub float_type_number($$)
sub float_name_caption($$)
{
my $self = shift;
- my $root = shift;
+ my $element = shift;
my $caption;
- if ($root->{'extra'}->{'caption'}) {
- $caption = $root->{'extra'}->{'caption'};
- } elsif ($root->{'extra'}->{'shortcaption'}) {
- $caption = $root->{'extra'}->{'shortcaption'};
+ if ($element->{'extra'}->{'caption'}) {
+ $caption = $element->{'extra'}->{'caption'};
+ } elsif ($element->{'extra'}->{'shortcaption'}) {
+ $caption = $element->{'extra'}->{'shortcaption'};
}
#if ($self->get_conf('DEBUG')) {
# my $caption_texi =
@@ -1041,38 +1041,38 @@ sub float_name_caption($$)
# print STDERR " CAPTION: $caption_texi\n";
#}
my $type;
- if ($root->{'extra'}->{'type'}->{'normalized'} ne '') {
- $type = {'contents' => $root->{'extra'}->{'type'}->{'content'}};
+ if ($element->{'extra'}->{'type'}->{'normalized'} ne '') {
+ $type = {'contents' => $element->{'extra'}->{'type'}->{'content'}};
}
my $prepended;
if ($type) {
if ($caption) {
- if (defined($root->{'number'})) {
+ if (defined($element->{'number'})) {
$prepended = $self->gdt('{float_type} {float_number}: ',
{'float_type' => $type,
- 'float_number' => $root->{'number'}});
+ 'float_number' => $element->{'number'}});
} else {
$prepended = $self->gdt('{float_type}: ',
{'float_type' => $type});
}
} else {
- if (defined($root->{'number'})) {
+ if (defined($element->{'number'})) {
$prepended = $self->gdt("{float_type} {float_number}\n",
{'float_type' => $type,
- 'float_number' => $root->{'number'}});
+ 'float_number' => $element->{'number'}});
} else {
$prepended = $self->gdt("{float_type}\n",
{'float_type' => $type});
}
}
- } elsif (defined($root->{'number'})) {
+ } elsif (defined($element->{'number'})) {
if ($caption) {
$prepended = $self->gdt('{float_number}: ',
- {'float_number' => $root->{'number'}});
+ {'float_number' => $element->{'number'}});
} else {
$prepended = $self->gdt("{float_number}\n",
- {'float_number' => $root->{'number'}});
+ {'float_number' => $element->{'number'}});
}
}
return ($caption, $prepended);
@@ -1083,18 +1083,18 @@ sub float_name_caption($$)
sub _end_line_or_comment($$)
{
my $self = shift;
- my $root = shift;
+ my $element = shift;
my $end_line;
- my $comment = $root->{'args'}->[-1]->{'extra'}->{'comment_at_end'}
- if $root->{'args'}->[-1]->{'extra'};
+ my $comment = $element->{'args'}->[-1]->{'extra'}->{'comment_at_end'}
+ if $element->{'args'}->[-1]->{'extra'};
if ($comment) {
$end_line = $self->convert_tree($comment);
- } elsif ($root->{'args'}->[-1]->{'extra'}
- and $root->{'args'}->[-1]->{'extra'}->{'spaces_after_argument'}) {
- my $text = $root->{'args'}->[-1]->{'extra'}->{'spaces_after_argument'};
+ } elsif ($element->{'args'}->[-1]->{'extra'}
+ and $element->{'args'}->[-1]->{'extra'}->{'spaces_after_argument'}) {
+ my $text = $element->{'args'}->[-1]->{'extra'}->{'spaces_after_argument'};
if (chomp($text)) {
$end_line = "\n";
} else {
@@ -1159,17 +1159,17 @@ sub _collect_leading_trailing_spaces_arg($$)
sub _table_item_content_tree($$$)
{
my $self = shift;
- my $root = shift;
+ my $element = shift;
my $contents = shift;
- my $converted_tree = {'parent' => $root};
- my $table_command = $root->{'parent'}->{'parent'}->{'parent'};
+ my $converted_tree = {'parent' => $element};
+ my $table_command = $element->{'parent'}->{'parent'}->{'parent'};
if ($table_command->{'extra'}
and $table_command->{'extra'}->{'command_as_argument'}) {
my $command_as_argument
= $table_command->{'extra'}->{'command_as_argument'};
my $command = {'cmdname' => $command_as_argument->{'cmdname'},
- 'line_nr' => $root->{'line_nr'},
+ 'line_nr' => $element->{'line_nr'},
'parent' => $converted_tree };
if ($command_as_argument->{'type'} eq 'definfoenclose_command') {
$command->{'type'} = $command_as_argument->{'type'};
@@ -1189,14 +1189,14 @@ sub _table_item_content_tree($$$)
sub _level_corrected_section($$)
{
my $self = shift;
- my $root = shift;
- my $heading_level = $root->{'level'};
+ my $element = shift;
+ my $heading_level = $element->{'level'};
my $command;
- if ($heading_level ne
$Texinfo::Common::command_structuring_level{$root->{'cmdname'}}) {
+ if ($heading_level ne
$Texinfo::Common::command_structuring_level{$element->{'cmdname'}}) {
$command
- =
$Texinfo::Common::level_to_structuring_command{$root->{'cmdname'}}->[$heading_level];
+ =
$Texinfo::Common::level_to_structuring_command{$element->{'cmdname'}}->[$heading_level];
} else {
- $command = $root->{'cmdname'};
+ $command = $element->{'cmdname'};
}
return $command;
}
diff --git a/tp/Texinfo/Convert/IXIN.pm b/tp/Texinfo/Convert/IXIN.pm
index 26e9816..7b9b8d1 100644
--- a/tp/Texinfo/Convert/IXIN.pm
+++ b/tp/Texinfo/Convert/IXIN.pm
@@ -333,7 +333,7 @@ sub output_ixin($$)
# FIXME vars: wait for Thien-Thi answer.
- my $elements = Texinfo::Structuring::split_by_node($root);
+ my $tree_units = Texinfo::Structuring::split_by_node($root);
# setting_commands is for @-commands appearing before the first node,
# while end_of_nodes_setting_commands holds, for @-commands names, the
# last @-command element.
@@ -431,8 +431,8 @@ sub output_ixin($$)
my %node_tweaks;
my @nodes;
my $document_output = '';
- if ($elements) {
- foreach my $node_element (@$elements) {
+ if ($tree_units) {
+ foreach my $node_element (@$tree_units) {
next if ($node_element->{'extra'}->{'no_node'});
$node_nr++;
my $node = $node_element->{'extra'}->{'unit_command'};
diff --git a/tp/Texinfo/Convert/NodeNameNormalization.pm
b/tp/Texinfo/Convert/NodeNameNormalization.pm
index 65a0e7d..4ddd502 100644
--- a/tp/Texinfo/Convert/NodeNameNormalization.pm
+++ b/tp/Texinfo/Convert/NodeNameNormalization.pm
@@ -191,88 +191,88 @@ sub _convert($;$);
sub _convert($;$)
{
- my $root = shift;
+ my $element = shift;
my $in_sc = shift;
- return '' if (($root->{'type'} and $ignored_types{$root->{'type'}})
- or ($root->{'cmdname'}
- and ($ignored_brace_commands{$root->{'cmdname'}}
+ return '' if (($element->{'type'} and $ignored_types{$element->{'type'}})
+ or ($element->{'cmdname'}
+ and ($ignored_brace_commands{$element->{'cmdname'}}
# here ignore the line commands
- or ($root->{'args'} and $root->{'args'}->[0]
- and $root->{'args'}->[0]->{'type'}
- and ($root->{'args'}->[0]->{'type'} eq 'line_arg'
- or $root->{'args'}->[0]->{'type'} eq 'misc_arg')))));
+ or ($element->{'args'} and $element->{'args'}->[0]
+ and $element->{'args'}->[0]->{'type'}
+ and ($element->{'args'}->[0]->{'type'} eq 'line_arg'
+ or $element->{'args'}->[0]->{'type'} eq
'misc_arg')))));
my $result = '';
- if (defined($root->{'text'})) {
- $result = $root->{'text'};
+ if (defined($element->{'text'})) {
+ $result = $element->{'text'};
$result =~ s/\s+/ /go;
$result = uc($result) if ($in_sc);
}
- if ($root->{'cmdname'}) {
- my $command = $root->{'cmdname'};
- if (defined($normalize_node_no_brace_commands{$root->{'cmdname'}})) {
- return $normalize_node_no_brace_commands{$root->{'cmdname'}};
- } elsif
(defined($normalize_node_brace_no_arg_commands{$root->{'cmdname'}})) {
- $command = $root->{'extra'}->{'clickstyle'}
- if ($root->{'extra'}
- and defined($root->{'extra'}->{'clickstyle'})
- and
defined($normalize_node_brace_no_arg_commands{$root->{'extra'}->{'clickstyle'}}));
+ if ($element->{'cmdname'}) {
+ my $command = $element->{'cmdname'};
+ if (defined($normalize_node_no_brace_commands{$element->{'cmdname'}})) {
+ return $normalize_node_no_brace_commands{$element->{'cmdname'}};
+ } elsif
(defined($normalize_node_brace_no_arg_commands{$element->{'cmdname'}})) {
+ $command = $element->{'extra'}->{'clickstyle'}
+ if ($element->{'extra'}
+ and defined($element->{'extra'}->{'clickstyle'})
+ and
defined($normalize_node_brace_no_arg_commands{$element->{'extra'}->{'clickstyle'}}));
my $result = $normalize_node_brace_no_arg_commands{$command};
if ($in_sc and $Texinfo::Common::letter_no_arg_commands{$command}) {
$result = uc($result);
}
return $result;
# commands with braces
- } elsif ($accent_commands{$root->{'cmdname'}}) {
- return '' if (!$root->{'args'});
- my $accent_text = _convert($root->{'args'}->[0]);
+ } elsif ($accent_commands{$element->{'cmdname'}}) {
+ return '' if (!$element->{'args'});
+ my $accent_text = _convert($element->{'args'}->[0]);
my $accented_char
= Texinfo::Convert::Unicode::unicode_accent($accent_text,
- $root);
+ $element);
if (!defined($accented_char)) {
# In this case, the node normalization do not follow the specification,
# but we cannot do better
$accented_char = Texinfo::Convert::Text::ascii_accent($accent_text,
- $root);
+ $element);
}
if ($in_sc) {
return uc ($accented_char);
} else {
return $accented_char;
}
- #} elsif ($root->{'cmdname'} eq 'image') {
- # return _convert($root->{'args'}->[0]);
- } elsif ($Texinfo::Common::ref_commands{$root->{'cmdname'}}) {
+ #} elsif ($element->{'cmdname'} eq 'image') {
+ # return _convert($element->{'args'}->[0]);
+ } elsif ($Texinfo::Common::ref_commands{$element->{'cmdname'}}) {
my @args_try_order;
- if ($root->{'cmdname'} eq 'inforef') {
+ if ($element->{'cmdname'} eq 'inforef') {
@args_try_order = (0, 1, 2);
} else {
@args_try_order = (0, 1, 2, 4, 3);
}
foreach my $index (@args_try_order) {
- if (defined($root->{'args'}->[$index])) {
- my $text = _convert($root->{'args'}->[$index]);
+ if (defined($element->{'args'}->[$index])) {
+ my $text = _convert($element->{'args'}->[$index]);
return $text if (defined($text) and $text =~ /\S/);
}
}
return '';
# Here all the commands with args are processed, if they have
# more than one arg the first one is used.
- } elsif ($root->{'args'} and $root->{'args'}->[0]
- and (($root->{'args'}->[0]->{'type'}
- and $root->{'args'}->[0]->{'type'} eq 'brace_command_arg')
- or $root->{'cmdname'} eq 'math')) {
- my $sc = 1 if ($root->{'cmdname'} eq 'sc' or $in_sc);
- return _convert($root->{'args'}->[0], $sc);
+ } elsif ($element->{'args'} and $element->{'args'}->[0]
+ and (($element->{'args'}->[0]->{'type'}
+ and $element->{'args'}->[0]->{'type'} eq 'brace_command_arg')
+ or $element->{'cmdname'} eq 'math')) {
+ my $sc = 1 if ($element->{'cmdname'} eq 'sc' or $in_sc);
+ return _convert($element->{'args'}->[0], $sc);
}
}
- if ($root->{'contents'}) {
- foreach my $content (@{$root->{'contents'}}) {
+ if ($element->{'contents'}) {
+ foreach my $content (@{$element->{'contents'}}) {
$result .= _convert($content, $in_sc);
}
}
$result = '{'.$result.'}'
- if ($root->{'type'} and $root->{'type'} eq 'bracketed');
+ if ($element->{'type'} and $element->{'type'} eq 'bracketed');
return $result;
}
diff --git a/tp/Texinfo/Convert/TexinfoSXML.pm
b/tp/Texinfo/Convert/TexinfoSXML.pm
index d40baf3..77cb2de 100644
--- a/tp/Texinfo/Convert/TexinfoSXML.pm
+++ b/tp/Texinfo/Convert/TexinfoSXML.pm
@@ -142,9 +142,9 @@ sub format_comment($$)
sub format_text($$)
{
my $self = shift;
- my $root = shift;
- my $result = $self->protect_text($root->{'text'});
- if (! defined($root->{'type'}) or $root->{'type'} ne 'raw') {
+ my $element = shift;
+ my $result = $self->protect_text($element->{'text'});
+ if (! defined($element->{'type'}) or $element->{'type'} ne 'raw') {
if (!$self->{'document_context'}->[-1]->{'monospace'}->[-1]) {
$result =~ s/``/" (textldquo (@)) "/g;
$result =~ s/\'\'/" (textrdquo (@)) "/g;
diff --git a/tp/Texinfo/Convert/Text.pm b/tp/Texinfo/Convert/Text.pm
index 9537a63..fac8cc3 100644
--- a/tp/Texinfo/Convert/Text.pm
+++ b/tp/Texinfo/Convert/Text.pm
@@ -236,17 +236,17 @@ sub text_accents($;$$)
sub brace_no_arg_command($;$)
{
- my $root = shift;
+ my $element = shift;
my $options = shift;
my $encoding;
$encoding = $options->{'enabled_encoding'}
if ($options and $options->{'enabled_encoding'});
- my $command = $root->{'cmdname'};
- $command = $root->{'extra'}->{'clickstyle'}
- if ($root->{'extra'}
- and defined($root->{'extra'}->{'clickstyle'})
- and
defined($text_brace_no_arg_commands{$root->{'extra'}->{'clickstyle'}}));
+ my $command = $element->{'cmdname'};
+ $command = $element->{'extra'}->{'clickstyle'}
+ if ($element->{'extra'}
+ and defined($element->{'extra'}->{'clickstyle'})
+ and
defined($text_brace_no_arg_commands{$element->{'extra'}->{'clickstyle'}}));
my $result;
if (!$options->{'no_extra_unicode'}
or !$Texinfo::Convert::Unicode::extra_unicode_map{$command}) {
@@ -363,40 +363,40 @@ sub _convert($;$);
sub _convert($;$)
{
- my $root = shift;
+ my $element = shift;
my $options = shift;
- return '' if (!($root->{'type'} and $root->{'type'} eq 'def_line')
- and (($root->{'type'} and $ignored_types{$root->{'type'}})
- or ($root->{'cmdname'}
- and ($ignored_brace_commands{$root->{'cmdname'}}
- or ($ignored_block_commands{$root->{'cmdname'}}
+ return '' if (!($element->{'type'} and $element->{'type'} eq 'def_line')
+ and (($element->{'type'} and $ignored_types{$element->{'type'}})
+ or ($element->{'cmdname'}
+ and ($ignored_brace_commands{$element->{'cmdname'}}
+ or ($ignored_block_commands{$element->{'cmdname'}}
and !(defined($options->{'expanded_formats_hash'})
- and
$options->{'expanded_formats_hash'}->{$root->{'cmdname'}}))
- or ($Texinfo::Common::inline_commands{$root->{'cmdname'}}
- and $root->{'cmdname'} ne 'inlinefmtifelse'
- and
(($Texinfo::Common::inline_format_commands{$root->{'cmdname'}}
- and (!$root->{'extra'}->{'format'}
- or
!$options->{'expanded_formats_hash'}->{$root->{'extra'}->{'format'}}))
- or
(!$Texinfo::Common::inline_format_commands{$root->{'cmdname'}}
- and
!defined($root->{'extra'}->{'expand_index'}))))
+ and
$options->{'expanded_formats_hash'}->{$element->{'cmdname'}}))
+ or ($Texinfo::Common::inline_commands{$element->{'cmdname'}}
+ and $element->{'cmdname'} ne 'inlinefmtifelse'
+ and
(($Texinfo::Common::inline_format_commands{$element->{'cmdname'}}
+ and (!$element->{'extra'}->{'format'}
+ or
!$options->{'expanded_formats_hash'}->{$element->{'extra'}->{'format'}}))
+ or
(!$Texinfo::Common::inline_format_commands{$element->{'cmdname'}}
+ and
!defined($element->{'extra'}->{'expand_index'}))))
# here ignore most of the misc commands
- or ($root->{'args'} and $root->{'args'}->[0]
- and $root->{'args'}->[0]->{'type'}
- and ($root->{'args'}->[0]->{'type'} eq 'line_arg'
- or $root->{'args'}->[0]->{'type'} eq 'misc_arg')
- and !$formatting_misc_commands{$root->{'cmdname'}})))));
+ or ($element->{'args'} and $element->{'args'}->[0]
+ and $element->{'args'}->[0]->{'type'}
+ and ($element->{'args'}->[0]->{'type'} eq 'line_arg'
+ or $element->{'args'}->[0]->{'type'} eq 'misc_arg')
+ and
!$formatting_misc_commands{$element->{'cmdname'}})))));
my $result = '';
- if (defined($root->{'text'})) {
- if ($root->{'type'} and $root->{'type'} eq 'untranslated'
+ if (defined($element->{'text'})) {
+ if ($element->{'type'} and $element->{'type'} eq 'untranslated'
and $options and $options->{'converter'}) {
- my $tree = $options->{'converter'}->gdt($root->{'text'}, undef,
- undef, $root->{'extra'}->{'documentlanguage'});
+ my $tree = $options->{'converter'}->gdt($element->{'text'}, undef,
+ undef, $element->{'extra'}->{'documentlanguage'});
$result = _convert($tree, $options);
} else {
- $result = $root->{'text'};
- if ((! defined($root->{'type'})
- or $root->{'type'} ne 'raw')
+ $result = $element->{'text'};
+ if ((! defined($element->{'type'})
+ or $element->{'type'} ne 'raw')
and !$options->{'raw'}) {
if ($options->{'sc'}) {
$result = uc($result);
@@ -411,14 +411,14 @@ sub _convert($;$)
}
}
}
- if ($root->{'cmdname'}) {
- my $command = $root->{'cmdname'};
- if (defined($no_brace_commands{$root->{'cmdname'}})) {
- return $no_brace_commands{$root->{'cmdname'}};
- } elsif ($root->{'cmdname'} eq 'today') {
+ if ($element->{'cmdname'}) {
+ my $command = $element->{'cmdname'};
+ if (defined($no_brace_commands{$element->{'cmdname'}})) {
+ return $no_brace_commands{$element->{'cmdname'}};
+ } elsif ($element->{'cmdname'} eq 'today') {
if ($options->{'sort_string'}
- and $sort_brace_no_arg_commands{$root->{'cmdname'}}) {
- return $sort_brace_no_arg_commands{$root->{'cmdname'}};
+ and $sort_brace_no_arg_commands{$element->{'cmdname'}}) {
+ return $sort_brace_no_arg_commands{$element->{'cmdname'}};
} elsif ($options->{'converter'}) {
return
_convert(Texinfo::Convert::Utils::expand_today($options->{'converter'}),
$options);
@@ -430,86 +430,86 @@ sub _convert($;$)
$year += ($year < 70) ? 2000 : 1900;
return "$Texinfo::Convert::Utils::MONTH_NAMES[$mon] $mday, $year";
}
- } elsif (defined($text_brace_no_arg_commands{$root->{'cmdname'}})) {
- return brace_no_arg_command($root, $options);
+ } elsif (defined($text_brace_no_arg_commands{$element->{'cmdname'}})) {
+ return brace_no_arg_command($element, $options);
# commands with braces
- } elsif ($accent_commands{$root->{'cmdname'}}) {
- my $result = text_accents ($root, $options->{'enabled_encoding'},
+ } elsif ($accent_commands{$element->{'cmdname'}}) {
+ my $result = text_accents ($element, $options->{'enabled_encoding'},
$options->{'sc'});
return $result;
- } elsif ($root->{'cmdname'} eq 'image') {
+ } elsif ($element->{'cmdname'} eq 'image') {
$options->{_code_options}++;
- my $text = _convert($root->{'args'}->[0], $options);
+ my $text = _convert($element->{'args'}->[0], $options);
$options->{_code_options}--;
return $text;
- } elsif ($root->{'cmdname'} eq 'email') {
+ } elsif ($element->{'cmdname'} eq 'email') {
$options->{_code_options}++;
- my $mail = _convert($root->{'args'}->[0], $options);
+ my $mail = _convert($element->{'args'}->[0], $options);
$options->{_code_options}--;
my $text;
- $text = _convert($root->{'args'}->[1], $options)
- if (defined($root->{'args'}->[1]));
+ $text = _convert($element->{'args'}->[1], $options)
+ if (defined($element->{'args'}->[1]));
return $text if (defined($text) and ($text ne ''));
return $mail;
- } elsif ($root->{'cmdname'} eq 'uref' or $root->{'cmdname'} eq 'url') {
+ } elsif ($element->{'cmdname'} eq 'uref' or $element->{'cmdname'} eq
'url') {
my $replacement;
- $replacement = _convert($root->{'args'}->[2], $options)
- if (defined($root->{'args'}->[2]));
+ $replacement = _convert($element->{'args'}->[2], $options)
+ if (defined($element->{'args'}->[2]));
return $replacement if (defined($replacement) and $replacement ne '');
my $text;
- $text = _convert($root->{'args'}->[1], $options)
- if (defined($root->{'args'}->[1]));
+ $text = _convert($element->{'args'}->[1], $options)
+ if (defined($element->{'args'}->[1]));
$options->{_code_options}++;
- my $url = _convert($root->{'args'}->[0], $options);
+ my $url = _convert($element->{'args'}->[0], $options);
$options->{_code_options}--;
if (defined($text) and $text ne '') {
return "$url ($text)";
} else {
return $url;
}
- } elsif ($Texinfo::Common::explained_commands{$root->{'cmdname'}}
- and $root->{'args'} and $root->{'args'}->[1]) {
- my $explanation = _convert($root->{'args'}->[1], $options);
+ } elsif ($Texinfo::Common::explained_commands{$element->{'cmdname'}}
+ and $element->{'args'} and $element->{'args'}->[1]) {
+ my $explanation = _convert($element->{'args'}->[1], $options);
if ($explanation ne '') {
- return _convert($root->{'args'}->[0], $options) ." ($explanation)";
+ return _convert($element->{'args'}->[0], $options) ." ($explanation)";
} else {
- return _convert($root->{'args'}->[0], $options);
+ return _convert($element->{'args'}->[0], $options);
}
- } elsif ($Texinfo::Common::inline_commands{$root->{'cmdname'}}) {
- $options->{'raw'} = 1 if ($root->{'cmdname'} eq 'inlineraw');
+ } elsif ($Texinfo::Common::inline_commands{$element->{'cmdname'}}) {
+ $options->{'raw'} = 1 if ($element->{'cmdname'} eq 'inlineraw');
my $arg_index = 1;
- if ($root->{'cmdname'} eq 'inlinefmtifelse'
- and (!$root->{'extra'}->{'format'}
- or
!$options->{'expanded_formats_hash'}->{$root->{'extra'}->{'format'}})) {
+ if ($element->{'cmdname'} eq 'inlinefmtifelse'
+ and (!$element->{'extra'}->{'format'}
+ or
!$options->{'expanded_formats_hash'}->{$element->{'extra'}->{'format'}})) {
$arg_index = 2;
}
- if (scalar(@{$root->{'args'}}) > $arg_index) {
- return _convert($root->{'args'}->[$arg_index], $options);
+ if (scalar(@{$element->{'args'}}) > $arg_index) {
+ return _convert($element->{'args'}->[$arg_index], $options);
} else {
return '';
}
- } elsif ($root->{'args'} and $root->{'args'}->[0]
- and (($root->{'args'}->[0]->{'type'}
- and $root->{'args'}->[0]->{'type'} eq 'brace_command_arg')
- or $Texinfo::Common::math_commands{$root->{'cmdname'}})) {
+ } elsif ($element->{'args'} and $element->{'args'}->[0]
+ and (($element->{'args'}->[0]->{'type'}
+ and $element->{'args'}->[0]->{'type'} eq 'brace_command_arg')
+ or $Texinfo::Common::math_commands{$element->{'cmdname'}})) {
my $result;
my $in_code;
- if ($root->{'cmdname'} eq 'sc') {
+ if ($element->{'cmdname'} eq 'sc') {
$options = {%$options, 'sc' => 1};
- } elsif ($Texinfo::Common::code_style_commands{$root->{'cmdname'}}
- or $Texinfo::Common::math_commands{$root->{'cmdname'}}) {
+ } elsif ($Texinfo::Common::code_style_commands{$element->{'cmdname'}}
+ or $Texinfo::Common::math_commands{$element->{'cmdname'}}) {
$in_code = 1;
}
$options->{_code_options}++ if ($in_code);
- $result = _convert($root->{'args'}->[0], $options);
+ $result = _convert($element->{'args'}->[0], $options);
$options->{_code_options}-- if ($in_code);
return $result;
# block commands
- } elsif ($root->{'cmdname'} eq 'quotation'
- or $root->{'cmdname'} eq 'smallquotation'
- or $root->{'cmdname'} eq 'float') {
- if ($root->{'args'}) {
- foreach my $arg (@{$root->{'args'}}) {
+ } elsif ($element->{'cmdname'} eq 'quotation'
+ or $element->{'cmdname'} eq 'smallquotation'
+ or $element->{'cmdname'} eq 'float') {
+ if ($element->{'args'}) {
+ foreach my $arg (@{$element->{'args'}}) {
my $converted_arg = _convert($arg, $options);
if ($converted_arg =~ /\S/) {
$result .= $converted_arg.", ";
@@ -519,27 +519,27 @@ sub _convert($;$)
chomp ($result);
$result .= "\n" if ($result =~ /\S/);
}
- } elsif ($options->{'expanded_formats_hash'}->{$root->{'cmdname'}}) {
+ } elsif ($options->{'expanded_formats_hash'}->{$element->{'cmdname'}}) {
$options->{'raw'} = 1;
- } elsif ($formatting_misc_commands{$root->{'cmdname'}} and
$root->{'args'}) {
- if ($root->{'cmdname'} eq 'sp') {
- if ($root->{'extra'} and $root->{'extra'}->{'misc_args'}
- and $root->{'extra'}->{'misc_args'}->[0]) {
+ } elsif ($formatting_misc_commands{$element->{'cmdname'}} and
$element->{'args'}) {
+ if ($element->{'cmdname'} eq 'sp') {
+ if ($element->{'extra'} and $element->{'extra'}->{'misc_args'}
+ and $element->{'extra'}->{'misc_args'}->[0]) {
# this useless copy avoids perl changing the type to integer!
- my $sp_nr = $root->{'extra'}->{'misc_args'}->[0];
+ my $sp_nr = $element->{'extra'}->{'misc_args'}->[0];
$result = "\n" x $sp_nr;
}
- } elsif ($root->{'cmdname'} eq 'verbatiminclude') {
+ } elsif ($element->{'cmdname'} eq 'verbatiminclude') {
my $verbatim_include_verbatim
= Texinfo::Convert::Utils::expand_verbatiminclude(
- $options->{'converter'}, $options, $root);
+ $options->{'converter'}, $options, $element);
if (defined($verbatim_include_verbatim)) {
$result .= _convert($verbatim_include_verbatim, $options);
}
- } elsif ($root->{'cmdname'} ne 'node') {
- $result = _convert($root->{'args'}->[0], $options);
- if ($Texinfo::Common::sectioning_commands{$root->{'cmdname'}}) {
- $result = heading($root, $result, $options->{'converter'},
+ } elsif ($element->{'cmdname'} ne 'node') {
+ $result = _convert($element->{'args'}->[0], $options);
+ if ($Texinfo::Common::sectioning_commands{$element->{'cmdname'}}) {
+ $result = heading($element, $result, $options->{'converter'},
$options->{'NUMBER_SECTIONS'});
} else {
# we always want an end of line even if is was eaten by a command
@@ -547,29 +547,29 @@ sub _convert($;$)
$result .= "\n";
}
}
- } elsif ($root->{'cmdname'} eq 'item'
- and $root->{'parent'}->{'cmdname'}
- and $root->{'parent'}->{'cmdname'} eq 'enumerate') {
+ } elsif ($element->{'cmdname'} eq 'item'
+ and $element->{'parent'}->{'cmdname'}
+ and $element->{'parent'}->{'cmdname'} eq 'enumerate') {
$result .= Texinfo::Common::enumerate_item_representation(
- $root->{'parent'}->{'extra'}->{'enumerate_specification'},
- $root->{'extra'}->{'item_number'}) . '. ';
+ $element->{'parent'}->{'extra'}->{'enumerate_specification'},
+ $element->{'extra'}->{'item_number'}) . '. ';
}
}
- if ($root->{'type'} and $root->{'type'} eq 'def_line') {
- #print STDERR "$root->{'extra'}->{'def_command'}\n";
- if ($root->{'extra'} and $root->{'extra'}->{'def_parsed_hash'}
- and %{$root->{'extra'}->{'def_parsed_hash'}}) {
+ if ($element->{'type'} and $element->{'type'} eq 'def_line') {
+ #print STDERR "$element->{'extra'}->{'def_command'}\n";
+ if ($element->{'extra'} and $element->{'extra'}->{'def_parsed_hash'}
+ and %{$element->{'extra'}->{'def_parsed_hash'}}) {
my $parsed_definition_category
= Texinfo::Convert::Utils::definition_category($options->{'converter'},
- $root);
+ $element);
my @contents = ($parsed_definition_category, {'text' => ': '});
- if ($root->{'extra'}->{'def_parsed_hash'}->{'type'}) {
- push @contents, ($root->{'extra'}->{'def_parsed_hash'}->{'type'},
+ if ($element->{'extra'}->{'def_parsed_hash'}->{'type'}) {
+ push @contents, ($element->{'extra'}->{'def_parsed_hash'}->{'type'},
{'text' => ' '});
}
- push @contents, $root->{'extra'}->{'def_parsed_hash'}->{'name'};
+ push @contents, $element->{'extra'}->{'def_parsed_hash'}->{'name'};
- my $arguments =
Texinfo::Convert::Utils::definition_arguments_content($root);
+ my $arguments =
Texinfo::Convert::Utils::definition_arguments_content($element);
if ($arguments) {
push @contents, {'text' => ' '};
push @contents, @$arguments;
@@ -579,8 +579,8 @@ sub _convert($;$)
$result = _convert({'contents' => \@contents}, $options);
$options->{_code_options}--;
}
- } elsif ($root->{'type'} and $root->{'type'} eq 'menu_entry') {
- foreach my $arg (@{$root->{'args'}}) {
+ } elsif ($element->{'type'} and $element->{'type'} eq 'menu_entry') {
+ foreach my $arg (@{$element->{'args'}}) {
if ($arg->{'type'} eq 'menu_entry_node') {
$options->{_code_options}++;
$result .= _convert($arg, $options);
@@ -589,37 +589,37 @@ sub _convert($;$)
$result .= _convert($arg, $options);
}
}
- if (!$root->{'parent'}->{'type'}
- or ($root->{'parent'}->{'type'} ne 'preformatted'
- and $root->{'parent'}->{'type'} ne 'rawpreformatted')) {
+ if (!$element->{'parent'}->{'type'}
+ or ($element->{'parent'}->{'type'} ne 'preformatted'
+ and $element->{'parent'}->{'type'} ne 'rawpreformatted')) {
chomp($result);
$result .= "\n";
}
}
- if ($root->{'contents'}) {
+ if ($element->{'contents'}) {
my $in_code;
- if ($root->{'cmdname'}
- and ($Texinfo::Common::preformatted_code_commands{$root->{'cmdname'}}
- or $Texinfo::Common::math_commands{$root->{'cmdname'}}
- or (defined($Texinfo::Common::block_commands{$root->{'cmdname'}})
- and $Texinfo::Common::block_commands{$root->{'cmdname'}} eq
'raw'))) {
+ if ($element->{'cmdname'}
+ and
($Texinfo::Common::preformatted_code_commands{$element->{'cmdname'}}
+ or $Texinfo::Common::math_commands{$element->{'cmdname'}}
+ or
(defined($Texinfo::Common::block_commands{$element->{'cmdname'}})
+ and $Texinfo::Common::block_commands{$element->{'cmdname'}}
eq 'raw'))) {
$in_code = 1;
}
- if (ref($root->{'contents'}) ne 'ARRAY') {
- cluck "contents not an array($root->{'contents'}).";
+ if (ref($element->{'contents'}) ne 'ARRAY') {
+ cluck "contents not an array($element->{'contents'}).";
}
$options->{_code_options}++ if ($in_code);
- foreach my $content (@{$root->{'contents'}}) {
+ foreach my $content (@{$element->{'contents'}}) {
$result .= _convert($content, $options);
}
$options->{_code_options}-- if ($in_code);
}
$result = '{'.$result.'}'
- if ($root->{'type'} and $root->{'type'} eq 'bracketed'
- and (!$root->{'parent'}->{'type'} or
- ($root->{'parent'}->{'type'} ne 'block_line_arg'
- and $root->{'parent'}->{'type'} ne 'line_arg')));
- #print STDERR " RR ($root) -> $result\n";
+ if ($element->{'type'} and $element->{'type'} eq 'bracketed'
+ and (!$element->{'parent'}->{'type'} or
+ ($element->{'parent'}->{'type'} ne 'block_line_arg'
+ and $element->{'parent'}->{'type'} ne 'line_arg')));
+ #print STDERR " RR ($element) -> $result\n";
return $result;
}
@@ -657,14 +657,14 @@ sub converter($)
= $converter->{'parser'}->global_commands_information();
foreach my $global_command ('documentencoding') {
if (defined($converter->{'global_commands'}->{$global_command})) {
- my $root = $converter->{'global_commands'}->{$global_command}->[0];
+ my $element = $converter->{'global_commands'}->{$global_command}->[0];
if ($global_command eq 'documentencoding'
- and defined($root->{'extra'})
- and defined($root->{'extra'}->{'input_perl_encoding'})) {
+ and defined($element->{'extra'})
+ and defined($element->{'extra'}->{'input_perl_encoding'})) {
$converter->{'OUTPUT_ENCODING_NAME'}
- = $root->{'extra'}->{'input_encoding_name'};
+ = $element->{'extra'}->{'input_encoding_name'};
$converter->{'OUTPUT_PERL_ENCODING'}
- = $root->{'extra'}->{'input_perl_encoding'};
+ = $element->{'extra'}->{'input_perl_encoding'};
}
}
}
@@ -685,17 +685,17 @@ sub converter($)
sub convert_tree($$)
{
my $self = shift;
- my $root = shift;
+ my $element = shift;
- return _convert($root);
+ return _convert($element);
}
sub convert($$)
{
my $self = shift;
- my $root = shift;
+ my $element = shift;
- return _convert($root);
+ return _convert($element);
}
# determine outfile and output to that file
diff --git a/tp/Texinfo/Convert/TextContent.pm
b/tp/Texinfo/Convert/TextContent.pm
index 35d529f..859e24e 100644
--- a/tp/Texinfo/Convert/TextContent.pm
+++ b/tp/Texinfo/Convert/TextContent.pm
@@ -96,72 +96,72 @@ sub _convert($$);
sub _convert($$)
{
my $self = shift;
- my $root = shift;
+ my $element = shift;
- return '' if (!($root->{'type'} and $root->{'type'} eq 'def_line')
- and (($root->{'type'} and $ignored_types{$root->{'type'}})
- or ($root->{'cmdname'}
- and ($ignored_brace_commands{$root->{'cmdname'}}
- or ($ignored_block_commands{$root->{'cmdname'}}
+ return '' if (!($element->{'type'} and $element->{'type'} eq 'def_line')
+ and (($element->{'type'} and $ignored_types{$element->{'type'}})
+ or ($element->{'cmdname'}
+ and ($ignored_brace_commands{$element->{'cmdname'}}
+ or ($ignored_block_commands{$element->{'cmdname'}}
and !(defined($self->{'expanded_formats_hash'})
- and
$self->{'expanded_formats_hash'}->{$root->{'cmdname'}}))
- or
($Texinfo::Common::inline_format_commands{$root->{'cmdname'}}
- and (!$root->{'extra'}->{'format'}
- or
!$self->{'expanded_formats_hash'}->{$root->{'extra'}->{'format'}}))
- or ($root->{'cmdname'} eq 'menu' and
$self->get_conf('FORMAT_MENU') eq 'nomenu')
+ and
$self->{'expanded_formats_hash'}->{$element->{'cmdname'}}))
+ or
($Texinfo::Common::inline_format_commands{$element->{'cmdname'}}
+ and (!$element->{'extra'}->{'format'}
+ or
!$self->{'expanded_formats_hash'}->{$element->{'extra'}->{'format'}}))
+ or ($element->{'cmdname'} eq 'menu' and
$self->get_conf('FORMAT_MENU') eq 'nomenu')
# here ignore most of the misc commands
- or ($root->{'args'} and $root->{'args'}->[0]
- and $root->{'args'}->[0]->{'type'}
- and ($root->{'args'}->[0]->{'type'} eq 'line_arg'
- or $root->{'args'}->[0]->{'type'} eq 'misc_arg')
- and
!$self->{'formatting_misc_commands'}->{$root->{'cmdname'}})))));
- if (defined($root->{'text'})) {
- return $root->{'text'};
+ or ($element->{'args'} and $element->{'args'}->[0]
+ and $element->{'args'}->[0]->{'type'}
+ and ($element->{'args'}->[0]->{'type'} eq 'line_arg'
+ or $element->{'args'}->[0]->{'type'} eq 'misc_arg')
+ and
!$self->{'formatting_misc_commands'}->{$element->{'cmdname'}})))));
+ if (defined($element->{'text'})) {
+ return $element->{'text'};
}
- if (defined($root->{'cmdname'})) {
- if (exists($Texinfo::Common::no_brace_commands{$root->{'cmdname'}})) {
- return $Texinfo::Common::no_brace_commands{$root->{'cmdname'}};
- } elsif ($root->{'cmdname'} eq 'today') {
+ if (defined($element->{'cmdname'})) {
+ if (exists($Texinfo::Common::no_brace_commands{$element->{'cmdname'}})) {
+ return $Texinfo::Common::no_brace_commands{$element->{'cmdname'}};
+ } elsif ($element->{'cmdname'} eq 'today') {
my($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst)
= localtime(time);
$year += ($year < 70) ? 2000 : 1900;
return "$Texinfo::Convert::Utils::MONTH_NAMES[$mon] $mday, $year";
- } elsif
(defined($Texinfo::Convert::Text::text_brace_no_arg_commands{$root->{'cmdname'}}))
{
- return Texinfo::Convert::Text::brace_no_arg_command($root, undef);
- } elsif ($Texinfo::Common::accent_commands{$root->{'cmdname'}}) {
+ } elsif
(defined($Texinfo::Convert::Text::text_brace_no_arg_commands{$element->{'cmdname'}}))
{
+ return Texinfo::Convert::Text::brace_no_arg_command($element, undef);
+ } elsif ($Texinfo::Common::accent_commands{$element->{'cmdname'}}) {
my %options =
Texinfo::Convert::Text::copy_options_for_convert_text($self);
- my $result = Texinfo::Convert::Text::text_accents ($root,
+ my $result = Texinfo::Convert::Text::text_accents ($element,
$options{'enabled_encoding'});
return $result;
}
}
my $result = '';
- if ($root->{'args'}
- and (!$root->{'cmdname'}
- or !$Texinfo::Common::block_item_commands{$root->{'cmdname'}})) {
+ if ($element->{'args'}
+ and (!$element->{'cmdname'}
+ or !$Texinfo::Common::block_item_commands{$element->{'cmdname'}})) {
my $args;
- if ($root->{'cmdname'}
- and $Texinfo::Common::inline_format_commands{$root->{'cmdname'}}) {
- my @args = @{$root->{'args'}};
+ if ($element->{'cmdname'}
+ and $Texinfo::Common::inline_format_commands{$element->{'cmdname'}}) {
+ my @args = @{$element->{'args'}};
shift @args;
$args = \@args;
} else {
- $args = $root->{'args'};
+ $args = $element->{'args'};
}
foreach my $arg (@{$args}) {
$result .= _convert ($self, $arg);
}
}
- if ($root->{'contents'}) {
- foreach my $content (@{$root->{'contents'}}) {
+ if ($element->{'contents'}) {
+ foreach my $content (@{$element->{'contents'}}) {
$result .= _convert ($self, $content);
}
}
$result = '{'.$result.'}'
- if ($root->{'type'} and $root->{'type'} eq 'bracketed'
- and (!$root->{'parent'}->{'type'} or
- ($root->{'parent'}->{'type'} ne 'block_line_arg'
- and $root->{'parent'}->{'type'} ne 'line_arg')));
+ if ($element->{'type'} and $element->{'type'} eq 'bracketed'
+ and (!$element->{'parent'}->{'type'} or
+ ($element->{'parent'}->{'type'} ne 'block_line_arg'
+ and $element->{'parent'}->{'type'} ne 'line_arg')));
return $result;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/Converter.pm, tp/Texinfo/Convert/IXIN.pm, tp/Texinfo/Convert/NodeNameNormalization.pm, tp/Texinfo/Convert/TexinfoSXML.pm, tp/Texinfo/Convert/Text.pm, tp/Texinfo/Convert/TextContent.pm: rename $root as $element if not a root element and $elements as $tree_units if only for tree_units.,
Patrice Dumas <=