texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Patrice Dumas
Date: Sat, 28 Sep 2024 17:43:54 -0400 (EDT)

branch: master
commit a864863934415db8dc5e1865a05588c8da7d084b
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Jun 2 19:41:08 2024 +0200

    * tp/Texinfo/Common.pm (%all_commands), tp/Texinfo/command_data.txt:
    as the internal commands also are in another category, they need to
    have a data field that can be compared to the category.  The internal
    commands therefore need to be removed explicitely from the %all_commands
    hash.
    
    * tp/Texinfo/XS/convert/convert_html.c (convert_to_html_internal):
    consider that an element with both a type and a command to be ignored
    if it is ignored both as a type element and as a command element.
---
 ChangeLog                            | 12 ++++++++++++
 tp/Texinfo/Common.pm                 |  3 +++
 tp/Texinfo/XS/convert/convert_html.c |  8 ++++----
 tp/Texinfo/command_data.txt          | 11 +++++++----
 4 files changed, 26 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index add36e3539..14d7ce2dcf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,18 @@
 
        Update test result
 
+2024-06-01  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Common.pm (%all_commands), tp/Texinfo/command_data.txt:
+       as the internal commands also are in another category, they need to
+       have a data field that can be compared to the category.  The internal
+       commands therefore need to be removed explicitely from the %all_commands
+       hash.
+
+       * tp/Texinfo/XS/convert/convert_html.c (convert_to_html_internal):
+       consider that an element with both a type and a command to be ignored
+       if it is ignored both as a type element and as a command element.
+
 2024-06-01  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/structuring_transfo/transformations.c: add const.
diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
index 53bc65b4fe..94713d8558 100644
--- a/tp/Texinfo/Common.pm
+++ b/tp/Texinfo/Common.pm
@@ -587,6 +587,9 @@ foreach my $command (
   keys(%Texinfo::Commands::nobrace_commands),
  ) {
   $all_commands{$command} = 1;
+  foreach my $internal_command (keys(%Texinfo::Commands::internal_commands)) {
+    delete $all_commands{$internal_command};
+  }
 }
 
 
diff --git a/tp/Texinfo/XS/convert/convert_html.c 
b/tp/Texinfo/XS/convert/convert_html.c
index b89453e648..0fa8f8a6c2 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -18430,10 +18430,10 @@ convert_to_html_internal (CONVERTER *self, const 
ELEMENT *element,
 
   if ((element->type
        && self->current_types_conversion_function[element->type].status
-                                                         == FRS_status_ignored)
-      || (cmd
-          && self->current_commands_conversion_function[cmd].status
-                                                         == 
FRS_status_ignored))
+                                                     == FRS_status_ignored)
+       && (!cmd
+           || self->current_commands_conversion_function[cmd].status
+                                                     == FRS_status_ignored))
     {
       if (self->conf->DEBUG.o.integer > 0)
         {
diff --git a/tp/Texinfo/command_data.txt b/tp/Texinfo/command_data.txt
index c6ee0e3a90..034d86557b 100644
--- a/tp/Texinfo/command_data.txt
+++ b/tp/Texinfo/command_data.txt
@@ -26,10 +26,13 @@
 ##############################################################
 # Internal commands
 # invalid if not accept_internalvalue set in configuration
-txiinternalvalue        internal,brace                  INTERNAL_brace
-# used in converters for easy access to flags
-definfoenclose_command  internal,brace                  INTERNAL_brace
-index_entry_command     
internal,line,index_entry_command,contain_basic_inline,no_paragraph      
INTERNAL_line
+txiinternalvalue        internal,brace                  BRACE_special
+# used in converters for easy access to flags.  Since CF_brace is
+# set, the data type should be acceptable for a brace command
+definfoenclose_command  internal,brace                  BRACE_style_other
+# Since CF_line is set, the data type should be acceptable for a line
+# command.
+index_entry_command     
internal,line,index_entry_command,contain_basic_inline,no_paragraph      
LINE_line
 
 
 ##############################################################



reply via email to

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