texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: * tp/Texinfo/Common.pm (element_is_inline), tp/Te


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Common.pm (element_is_inline), tp/Texinfo/Convert/Converter.pm, tp/Texinfo/Convert/DocBook.pm, tp/Texinfo/Convert/TexinfoXML.pm: move _is_inline() and _in_inline() from Texinfo::Convert::Converter to Texinfo::Common, rename and merge in element_is_inline() adding an optional argument to de able to also do the same as _in_inline().
Date: Thu, 09 Sep 2021 03:01:56 -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 bea1692  * tp/Texinfo/Common.pm (element_is_inline), 
tp/Texinfo/Convert/Converter.pm, tp/Texinfo/Convert/DocBook.pm, 
tp/Texinfo/Convert/TexinfoXML.pm: move _is_inline() and _in_inline() from 
Texinfo::Convert::Converter to Texinfo::Common, rename and merge in 
element_is_inline() adding an optional argument to de able to also do the same 
as _in_inline().
bea1692 is described below

commit bea1692b6cdc50351167f6be259421a49f51fdf5
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Sep 9 09:01:47 2021 +0200

    * tp/Texinfo/Common.pm (element_is_inline),
    tp/Texinfo/Convert/Converter.pm, tp/Texinfo/Convert/DocBook.pm,
    tp/Texinfo/Convert/TexinfoXML.pm: move _is_inline() and
    _in_inline() from Texinfo::Convert::Converter to Texinfo::Common,
    rename and merge in element_is_inline() adding an optional
    argument to de able to also do the same as _in_inline().
---
 ChangeLog                                     |   9 ++
 tp/Texinfo/Common.pm                          |  59 ++++++++-
 tp/Texinfo/Convert/Converter.pm               |  51 --------
 tp/Texinfo/Convert/DocBook.pm                 |   5 +-
 tp/Texinfo/Convert/TexinfoXML.pm              |   2 +-
 tp/t/accents.t                                |   1 -
 tp/t/results/xml_tests/image_inline_or_not.pl | 180 +++++++++++++++++++++-----
 tp/t/xml_tests.t                              |   6 +
 8 files changed, 224 insertions(+), 89 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b52ad30..6df1820 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2021-09-09  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Common.pm (element_is_inline),
+       tp/Texinfo/Convert/Converter.pm, tp/Texinfo/Convert/DocBook.pm,
+       tp/Texinfo/Convert/TexinfoXML.pm: move _is_inline() and
+       _in_inline() from Texinfo::Convert::Converter to Texinfo::Common,
+       rename and merge in element_is_inline() adding an optional
+       argument to de able to also do the same as _in_inline().
+
 2021-09-08  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/HTML.pm (%defaults), tp/Texinfo/Common.pm
diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
index 2b909f8..c3ff10b 100644
--- a/tp/Texinfo/Common.pm
+++ b/tp/Texinfo/Common.pm
@@ -1548,6 +1548,55 @@ sub is_content_empty($;$)
   }
   return 1;
 }
+
+# if in this container, we are 'inline', within a running text
+my @inline_types = ('def_line', 'paragraph', 'preformatted',
+  'line_arg', 'block_line_arg', 'menu_entry_name', 'menu_entry_node');
+
+my %inline_types;
+foreach my $type (@inline_types) {
+  $inline_types{$type} = 1;
+}
+
+my %not_inline_commands = (%root_commands, %block_commands,
+                           %context_brace_commands);
+
+# Return 1 if inline in a running text, 0 if right in top-level or block
+# environment, and undef otherwise.
+sub _inline_or_block($)
+{
+  my $current = shift;
+  if ($current->{'type'} and $inline_types{$current->{'type'}}) {
+    return 1;
+  } elsif ($current->{'cmdname'}
+           and exists($not_inline_commands{$current->{'cmdname'}})) {
+    return 0;
+  } else {
+    return undef;
+  }
+}
+
+# return true if in running text context.
+# If $CHECK_CURRENT is set, check the element itself, too, in
+# addition to the parent context.
+sub element_is_inline($;$)
+{
+  my $current = shift;
+  my $check_current = shift;
+
+  if ($check_current) {
+    my $inline_or_block = _inline_or_block($current);
+    return ($inline_or_block) if (defined($inline_or_block));
+  }
+
+  while ($current->{'parent'}) {
+    $current = $current->{'parent'};
+    my $inline_or_block = _inline_or_block($current);
+    return ($inline_or_block) if (defined($inline_or_block));
+  }
+  return 0;
+}
+
 sub normalize_top_node_name($)
 {
   my $node = shift;
@@ -2595,10 +2644,16 @@ see L<Texinfo::Convert::Converter> and 
L<Texinfo::Report>.
 
 =over
 
+=item $result = element_is_inline($element, $check_current)
+
+Return true if the element passed in argument is in running text
+context.  If the optional I<$check_current> argument is set,
+check the element itself, in addition to the parent context.
+
 =item $result = is_content_empty($tree, $do_not_ignore_index_entries)
 
-Return true if the C<$tree> has content that could be formatted.
-C<$do_not_ignore_index_entries> is optional.  If set, index entries
+Return true if the I<$tree> has content that could be formatted.
+I<$do_not_ignore_index_entries> is optional.  If set, index entries
 are considered to be formatted.
 
 =item $text = enumerate_item_representation($specification, $number)
diff --git a/tp/Texinfo/Convert/Converter.pm b/tp/Texinfo/Convert/Converter.pm
index a7670ec..8955c8d 100644
--- a/tp/Texinfo/Convert/Converter.pm
+++ b/tp/Texinfo/Convert/Converter.pm
@@ -1297,57 +1297,6 @@ sub convert_document_nodes($$;$)
   return $self->_convert_document_tree_units($root, $tree_units, $fh);
 }
 
-# if in this container, we are 'inline', within a running text
-my @inline_types = ('def_line', 'paragraph', 'preformatted',
-  'line_arg', 'block_line_arg', 'menu_entry_name', 'menu_entry_node');
-
-my %inline_types;
-foreach my $type (@inline_types) {
-  $inline_types{$type} = 1;
-}
-
-my %not_inline_commands = (%Texinfo::Common::root_commands, 
-  %Texinfo::Common::block_commands, %Texinfo::Common::context_brace_command);
-
-# Return 1 if inline in a running text, 0 if right in top-level or block
-# environment, and undef otherwise.
-sub _inline_or_block($$)
-{
-  my $self = shift;
-  my $current = shift;
-  if ($current->{'type'} and $inline_types{$current->{'type'}}) {
-    return 1;
-  } elsif ($current->{'cmdname'} 
-           and exists($not_inline_commands{$current->{'cmdname'}})) {
-    return 0;
-  } else {
-    return undef;
-  }
-}
-
-# return true if in running text context
-sub _is_inline($$)
-{
-  my $self = shift;
-  my $current = shift;
-  while ($current->{'parent'}) {
-    $current = $current->{'parent'};
-    my $inline_or_block = $self->_inline_or_block($current);
-    return ($inline_or_block) if (defined($inline_or_block));
-  }
-  return 0;
-}
-
-# return true if container or parent may hold running text
-sub _in_inline($$)
-{
-  my $self = shift;
-  my $current = shift;
-  my $inline_or_block = $self->_inline_or_block($current);
-  return ($inline_or_block) if (defined($inline_or_block));
-  return $self->_is_inline($current);
-}
-
 our %default_args_code_style = (
   'email' => [1],
   'anchor' => [1],
diff --git a/tp/Texinfo/Convert/DocBook.pm b/tp/Texinfo/Convert/DocBook.pm
index 74900d7..1a350fb 100644
--- a/tp/Texinfo/Convert/DocBook.pm
+++ b/tp/Texinfo/Convert/DocBook.pm
@@ -1009,7 +1009,7 @@ sub _convert($$;$)
            {'contents' => $element->{'args'}->[0]->{'contents'}},
            {'code' => 1,
             Texinfo::Convert::Text::copy_options_for_convert_text($self)});
-          my $is_inline = $self->_is_inline($element);
+          my $is_inline = Texinfo::Common::element_is_inline($element);
           if ($is_inline) {
             $result .= "<inlinemediaobject>";
           } else {
@@ -1413,7 +1413,8 @@ sub _convert($$;$)
     if (ref($element->{'contents'}) ne 'ARRAY') {
       cluck "contents not an array($element->{'contents'}).";
     }
-    if (defined($self->{'pending_prepend'}) and $self->_in_inline($element)) {
+    if (defined($self->{'pending_prepend'})
+        and Texinfo::Common::element_is_inline($element, 1)) {
       $result .= $self->{'pending_prepend'};
       delete $self->{'pending_prepend'};
     }
diff --git a/tp/Texinfo/Convert/TexinfoXML.pm b/tp/Texinfo/Convert/TexinfoXML.pm
index b9604b3..50e671e 100644
--- a/tp/Texinfo/Convert/TexinfoXML.pm
+++ b/tp/Texinfo/Convert/TexinfoXML.pm
@@ -1212,7 +1212,7 @@ sub _convert($$;$)
       # This is for the main command
       $attribute = [];
       if ($element->{'cmdname'} eq 'image') {
-        if ($self->_is_inline($element)) {
+        if (Texinfo::Common::element_is_inline($element)) {
           push @$attribute, ('where', 'inline');
         }
       } elsif ($Texinfo::Common::ref_commands{$element->{'cmdname'}}) {
diff --git a/tp/t/accents.t b/tp/t/accents.t
index d43e9a3..f9e11a2 100644
--- a/tp/t/accents.t
+++ b/tp/t/accents.t
@@ -187,7 +187,6 @@ foreach my $test (
   test_enable_encoding($test);
 }
 
-#my $aa = Texinfo::Parser::parse_texi_line(undef, '@aa{}');
 my $res_e = Texinfo::Parser::parse_texi_line(undef, '@^e');
 my $result = Texinfo::Convert::Text::convert_to_text($res_e, 
{'enabled_encoding' => 'utf-8'});
 is ($result, "\x{00EA}", 'enable encoding @^e');
diff --git a/tp/t/results/xml_tests/image_inline_or_not.pl 
b/tp/t/results/xml_tests/image_inline_or_not.pl
index f99e112..ebcf325 100644
--- a/tp/t/results/xml_tests/image_inline_or_not.pl
+++ b/tp/t/results/xml_tests/image_inline_or_not.pl
@@ -1303,6 +1303,96 @@ $result_trees{'image_inline_or_not'} = {
           'type' => 'empty_line'
         },
         {
+          'contents' => [
+            {
+              'parent' => {},
+              'text' => 'U'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'contents' => [
+                        {
+                          'parent' => {},
+                          'text' => 'Some t
+'
+                        },
+                        {
+                          'args' => [
+                            {
+                              'contents' => [
+                                {
+                                  'parent' => {},
+                                  'text' => 'in text in_footnote'
+                                }
+                              ],
+                              'parent' => {},
+                              'type' => 'brace_command_arg'
+                            }
+                          ],
+                          'cmdname' => 'image',
+                          'contents' => [],
+                          'extra' => {
+                            'input_perl_encoding' => 'utf-8'
+                          },
+                          'line_nr' => {
+                            'file_name' => '',
+                            'line_nr' => 51,
+                            'macro' => ''
+                          },
+                          'parent' => {}
+                        },
+                        {
+                          'parent' => {},
+                          'text' => '
+'
+                        }
+                      ],
+                      'parent' => {},
+                      'type' => 'paragraph'
+                    },
+                    {
+                      'parent' => {},
+                      'text' => '
+',
+                      'type' => 'empty_line'
+                    }
+                  ],
+                  'parent' => {},
+                  'type' => 'brace_command_context'
+                }
+              ],
+              'cmdname' => 'footnote',
+              'contents' => [],
+              'extra' => {
+                'spaces_before_argument' => '
+'
+              },
+              'line_nr' => {
+                'file_name' => '',
+                'line_nr' => 49,
+                'macro' => ''
+              },
+              'parent' => {}
+            },
+            {
+              'parent' => {},
+              'text' => '
+'
+            }
+          ],
+          'parent' => {},
+          'type' => 'paragraph'
+        },
+        {
+          'parent' => {},
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
           'args' => [
             {
               'contents' => [
@@ -1357,7 +1447,7 @@ $result_trees{'image_inline_or_not'} = {
               },
               'line_nr' => {
                 'file_name' => '',
-                'line_nr' => 51,
+                'line_nr' => 57,
                 'macro' => ''
               },
               'parent' => {}
@@ -1397,7 +1487,7 @@ $result_trees{'image_inline_or_not'} = {
                       },
                       'line_nr' => {
                         'file_name' => '',
-                        'line_nr' => 53,
+                        'line_nr' => 59,
                         'macro' => ''
                       },
                       'parent' => {}
@@ -1428,7 +1518,7 @@ $result_trees{'image_inline_or_not'} = {
                           },
                           'line_nr' => {
                             'file_name' => '',
-                            'line_nr' => 53,
+                            'line_nr' => 59,
                             'macro' => ''
                           },
                           'parent' => {}
@@ -1449,7 +1539,7 @@ $result_trees{'image_inline_or_not'} = {
               },
               'line_nr' => {
                 'file_name' => '',
-                'line_nr' => 53,
+                'line_nr' => 59,
                 'macro' => ''
               },
               'parent' => {}
@@ -1484,7 +1574,7 @@ $result_trees{'image_inline_or_not'} = {
               },
               'line_nr' => {
                 'file_name' => '',
-                'line_nr' => 54,
+                'line_nr' => 60,
                 'macro' => ''
               },
               'parent' => {}
@@ -1508,7 +1598,7 @@ $result_trees{'image_inline_or_not'} = {
           },
           'line_nr' => {
             'file_name' => '',
-            'line_nr' => 49,
+            'line_nr' => 55,
             'macro' => ''
           },
           'number' => '1.1',
@@ -1707,37 +1797,50 @@ 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[2]{'contents'}[1
 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[2]{'contents'}[2]{'parent'}
 = $result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[2];
 $result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[2]{'parent'} = 
$result_trees{'image_inline_or_not'}{'contents'}[4];
 $result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[3]{'parent'} = 
$result_trees{'image_inline_or_not'}{'contents'}[4];
-$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'args'}[0];
-$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'args'}[0]{'parent'}
 = $result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4];
-$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'args'}[1]{'contents'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'args'}[1];
-$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'args'}[1]{'parent'}
 = $result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4];
 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[0]{'parent'}
 = $result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'}[0]{'contents'}[1]{'args'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'}[0]{'contents'}[1];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'}[0]{'contents'}[1]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'}[0]{'contents'}[2]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'}[0];
 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[1]{'args'}[0];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[1]{'args'}[0];
 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[1]{'args'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[1];
 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[1]{'parent'}
 = $result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4];
 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[2]{'parent'}
 = $result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4];
-$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[3]{'parent'}
 = $result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4];
-$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[0]{'args'}[0];
-$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[0]{'args'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[0];
-$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[4]{'args'}[0];
-$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[1]{'contents'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[1];
-$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[1]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[1]{'contents'}[1]{'args'}[0];
-$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[1]{'contents'}[1]{'args'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[1]{'contents'}[1];
-$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[1]{'contents'}[1]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[1];
-$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[1]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[4]{'args'}[0];
-$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[4]{'args'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[4];
-$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[4]{'extra'}{'float'}
 = $result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4];
-$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[4]{'parent'}
 = $result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4];
-$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[5]{'parent'}
 = $result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4];
-$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[6]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[6]{'args'}[0];
-$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[6]{'args'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[6];
-$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[6]{'parent'}
 = $result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4];
-$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'extra'}{'caption'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[4];
-$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'extra'}{'end_command'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'contents'}[6];
-$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'extra'}{'float_section'}
 = $result_trees{'image_inline_or_not'}{'contents'}[4];
-$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'extra'}{'node_content'}[0]
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'args'}[1]{'contents'}[0];
-$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'extra'}{'type'}{'content'}[0]
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[0];
 $result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[4]{'parent'} = 
$result_trees{'image_inline_or_not'}{'contents'}[4];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[5]{'parent'} = 
$result_trees{'image_inline_or_not'}{'contents'}[4];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'args'}[0];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'args'}[0]{'parent'}
 = $result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'args'}[1]{'contents'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'args'}[1];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'args'}[1]{'parent'}
 = $result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[0]{'parent'}
 = $result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[1]{'args'}[0];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[1]{'args'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[1];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[1]{'parent'}
 = $result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[2]{'parent'}
 = $result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[3]{'parent'}
 = $result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[4]{'args'}[0]{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[4]{'args'}[0]{'contents'}[0]{'args'}[0];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[4]{'args'}[0]{'contents'}[0]{'args'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[4]{'args'}[0]{'contents'}[0];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[4]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[4]{'args'}[0];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[4]{'args'}[0]{'contents'}[1]{'contents'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[4]{'args'}[0]{'contents'}[1];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[4]{'args'}[0]{'contents'}[1]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[4]{'args'}[0]{'contents'}[1]{'contents'}[1]{'args'}[0];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[4]{'args'}[0]{'contents'}[1]{'contents'}[1]{'args'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[4]{'args'}[0]{'contents'}[1]{'contents'}[1];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[4]{'args'}[0]{'contents'}[1]{'contents'}[1]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[4]{'args'}[0]{'contents'}[1];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[4]{'args'}[0]{'contents'}[1]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[4]{'args'}[0];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[4]{'args'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[4];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[4]{'extra'}{'float'}
 = $result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[4]{'parent'}
 = $result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[5]{'parent'}
 = $result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[6]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[6]{'args'}[0];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[6]{'args'}[0]{'parent'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[6];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[6]{'parent'}
 = $result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'extra'}{'caption'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[4];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'extra'}{'end_command'}
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'contents'}[6];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'extra'}{'float_section'}
 = $result_trees{'image_inline_or_not'}{'contents'}[4];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'extra'}{'node_content'}[0]
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'args'}[1]{'contents'}[0];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'extra'}{'type'}{'content'}[0]
 = 
$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'args'}[0]{'contents'}[0];
+$result_trees{'image_inline_or_not'}{'contents'}[4]{'contents'}[6]{'parent'} = 
$result_trees{'image_inline_or_not'}{'contents'}[4];
 $result_trees{'image_inline_or_not'}{'contents'}[4]{'parent'} = 
$result_trees{'image_inline_or_not'};
 
 $result_texis{'image_inline_or_not'} = '@image{A}
@@ -1788,6 +1891,12 @@ T@footnote{
 @image{in_footnote}
 }
 
+U@footnote{
+Some t
+@image{in text in_footnote}
+
+}
+
 @float F,g
 
 @image{in_float}
@@ -1836,6 +1945,8 @@ in_menu_comment
 
 T
 
+U
+
 F, g
 
 in_float
@@ -2063,7 +2174,12 @@ T
 <chapter spaces=" "><sectiontitle><image 
where="inline"><imagefile>in_chapter_arg</imagefile></image></sectiontitle>
 
 
-<para>T<footnote spaces="\\n"><image 
where="inline"><imagefile>in_footnote</imagefile></image>
+<para>T<footnote spaces="\\n"><image><imagefile>in_footnote</imagefile></image>
+</footnote>
+</para>
+<para>U<footnote spaces="\\n"><para>Some t
+<image where="inline"><imagefile>in text in_footnote</imagefile></image>
+</para>
 </footnote>
 </para>
 <float name="g" type="F" number="1.1" spaces=" " endspaces=" 
"><floattype>F</floattype><floatname>g</floatname>
diff --git a/tp/t/xml_tests.t b/tp/t/xml_tests.t
index 5e9f666..837f2af 100644
--- a/tp/t/xml_tests.t
+++ b/tp/t/xml_tests.t
@@ -55,6 +55,12 @@ T@footnote{
 @image{in_footnote}
 }
 
+U@footnote{
+Some t
+@image{in text in_footnote}
+
+}
+
 @float F,g
 
 @image{in_float}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]