texinfo-commits
[Top][All Lists]
Advanced

[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): determine the command name usable as Texinfo::Commands key by using the generic definfoenclose one if the type is definfoenclose. Similar to using element_builtin_cmd in C.
Date: Sun, 29 Sep 2024 02:40:12 -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 c0351771f3 * tp/Texinfo/Convert/Converter.pm 
(table_item_content_tree): determine the command name usable as 
Texinfo::Commands key by using the generic definfoenclose one if the type is 
definfoenclose.  Similar to using element_builtin_cmd in C.
c0351771f3 is described below

commit c0351771f3eec7cd4f4117b4d36f74e1e2ae6370
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue Jun 4 22:49:58 2024 +0200

    * tp/Texinfo/Convert/Converter.pm (table_item_content_tree): determine
    the command name usable as Texinfo::Commands key by using the
    generic definfoenclose one if the type is definfoenclose.  Similar to
    using element_builtin_cmd in C.
---
 ChangeLog                       |  7 +++++--
 tp/Texinfo/Convert/Converter.pm | 12 ++++++++----
 2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5eff01c1cf..7323560d87 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
-2024-09-28  Patrice Dumas  <pertusus@free.fr>
+2024-06-04  Patrice Dumas  <pertusus@free.fr>
 
-       Update test results
+       * tp/Texinfo/Convert/Converter.pm (table_item_content_tree): determine
+       the command name usable as Texinfo::Commands key by using the
+       generic definfoenclose one if the type is definfoenclose.  Similar to
+       using element_builtin_cmd in C.
 
 2024-06-03  Patrice Dumas  <pertusus@free.fr>
 
diff --git a/tp/Texinfo/Convert/Converter.pm b/tp/Texinfo/Convert/Converter.pm
index f2bd8c9f20..c9643cb268 100644
--- a/tp/Texinfo/Convert/Converter.pm
+++ b/tp/Texinfo/Convert/Converter.pm
@@ -1481,23 +1481,27 @@ sub table_item_content_tree($$)
     if ($table_command->{'extra'}->{'command_as_argument_kbd_code'}) {
       $command->{'extra'} = {'code' => 1};
     }
+    # command name for the Texinfo::Commands hashes tests
+    my $builtin_cmdname;
     if ($command_as_argument->{'type'}
         and $command_as_argument->{'type'} eq 'definfoenclose_command') {
       $command->{'type'} = $command_as_argument->{'type'};
       $command->{'extra'} = {} if (!$command->{'extra'});
       $command->{'extra'}->{'begin'} = 
$command_as_argument->{'extra'}->{'begin'};
       $command->{'extra'}->{'end'} = $command_as_argument->{'extra'}->{'end'};
+      $builtin_cmdname = 'definfoenclose_command';
+    } else {
+      $builtin_cmdname = $command_as_argument_cmdname;
     }
     my $arg;
-    if ($Texinfo::Commands::brace_commands{$command_as_argument_cmdname}
-                                                   eq 'context') {
+    if ($Texinfo::Commands::brace_commands{$builtin_cmdname} eq 'context') {
       # This corresponds to a bogus @*table line with command line @footnote
       # or @math.  We do not really care about the formatting of the result
       # but we want to avoid debug messages, so we setup expected trees
       # for those @-commands.
       $arg = {'type' => 'brace_command_context',
               'parent' => $command,};
-      if ($Texinfo::Commands::math_commands{$command_as_argument_cmdname}) {
+      if ($Texinfo::Commands::math_commands{$builtin_cmdname}) {
         $arg->{'contents'} = [$element->{'args'}->[0]];
       } else {
         my $paragraph = {'type' => 'paragraph',
@@ -1505,7 +1509,7 @@ sub table_item_content_tree($$)
                          'parent' => $arg};
         $arg->{'contents'} = [$paragraph];
       }
-    } elsif ($Texinfo::Commands::brace_commands{$command_as_argument_cmdname}
+    } elsif ($Texinfo::Commands::brace_commands{$builtin_cmdname}
                                                    eq 'arguments') {
       $arg = {'type' => 'brace_arg',
               'contents' => [$element->{'args'}->[0]],



reply via email to

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