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 (_substitute_references):


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Common.pm (_substitute_references): handle index_ignore_chars.
Date: Sun, 02 Jan 2022 18:57:55 -0500

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 cb5190a6fe * tp/Texinfo/Common.pm (_substitute_references): handle 
index_ignore_chars.
cb5190a6fe is described below

commit cb5190a6fec95b2410cffc895b6ce95776f6adfa
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon Jan 3 00:57:43 2022 +0100

    * tp/Texinfo/Common.pm (_substitute_references): handle
    index_ignore_chars.
---
 ChangeLog             | 5 +++++
 tp/TODO               | 2 +-
 tp/Texinfo/Common.pm  | 6 ++++--
 tp/t/test_tree_copy.t | 3 +++
 4 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bdbf906e8f..ed9db9f1db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-01-02  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Common.pm (_substitute_references): handle
+       index_ignore_chars.
+
 2022-01-02  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/HTML.pm: rename name extra key of special
diff --git a/tp/TODO b/tp/TODO
index de2663cf50..08c819de27 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -13,7 +13,7 @@ xmllint --nonet --noout --valid commands.xml
 Before next release
 ===================
 
-Special elements are ignored in different contexts, see IGNORED SPE.
+Special elements are ignored in different contexts, see IGNORED SPE
 in HTML.pm. There are tests already showing that.
 
 
diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
index cb9b1c7951..d2b3003660 100644
--- a/tp/Texinfo/Common.pm
+++ b/tp/Texinfo/Common.pm
@@ -2014,7 +2014,7 @@ sub _copy_tree($$$)
           push @{$new->{'extra'}->{$key}},
                   _copy_tree($child, $new, $reference_associations);
         }
-      } elsif (!ref($current->{'extra'}->{$key})) {
+      } elsif (ref($current->{'extra'}->{$key}) eq '') {
         $new->{'extra'}->{$key} = $current->{'extra'}->{$key};
       }
     }
@@ -2109,7 +2109,7 @@ sub _substitute_references($$$)
                      and $current->{'type'} eq 'menu_entry'
                      and $key eq 'menu_entry_node')) {
               foreach my $type_key (keys(%{$current->{'extra'}->{$key}})) {
-                if (!ref($current->{'extra'}->{$key}->{$type_key})) {
+                if (ref($current->{'extra'}->{$key}->{$type_key}) eq '') {
                   $new->{'extra'}->{$key}->{$type_key}
                     = $current->{'extra'}->{$key}->{$type_key};
                 } elsif 
($reference_associations->{$current->{'extra'}->{$key}->{$type_key}}) {
@@ -2121,6 +2121,8 @@ sub _substitute_references($$$)
                       $current->{'extra'}->{$key}->{$type_key},
                       $reference_associations,
                       "[$command_or_type]{$key}{$type_key}");
+                } elsif ($key eq 'index_entry' and $type_key eq 
'index_ignore_chars') {
+                  $new->{'extra'}->{$key}->{$type_key} = { 
%{$current->{'extra'}->{$key}->{$type_key}} };
                 } else {
                   print STDERR "Not substituting [$command_or_type]{$key}: 
$type_key\n";
                 }
diff --git a/tp/t/test_tree_copy.t b/tp/t/test_tree_copy.t
index f49d670331..0545aec28b 100644
--- a/tp/t/test_tree_copy.t
+++ b/tp/t/test_tree_copy.t
@@ -63,6 +63,9 @@ Something
 
 @cindex cindex
 
+@set txiindexlessthanignore
+@vindex v<index
+
 @printindex cp
 
 @quotation trc



reply via email to

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