texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/Convert/Plaintext.pm (process_printi


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Convert/Plaintext.pm (process_printindex): use scalar() on hash keys, not on hash to detect if empty.
Date: Sat, 01 Oct 2022 12:44: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 7cc109f72c * tp/Texinfo/Convert/Plaintext.pm (process_printindex): use 
scalar() on hash keys, not on hash to detect if empty.
7cc109f72c is described below

commit 7cc109f72ca9be84603c0ab36aef6ca0546a3491
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Oct 1 18:44:37 2022 +0200

    * tp/Texinfo/Convert/Plaintext.pm (process_printindex): use scalar()
    on hash keys, not on hash to detect if empty.
---
 ChangeLog                       | 5 +++++
 tp/Texinfo/Convert/Plaintext.pm | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 0f04047f92..7849b70dc8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-10-01  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Convert/Plaintext.pm (process_printindex): use scalar()
+       on hash keys, not on hash to detect if empty.
+
 2022-10-01  Gavin Smith  <gavinsmith0123@gmail.com>
 
        * README-hacking: note that gettextize can downgrade files
diff --git a/tp/Texinfo/Convert/Plaintext.pm b/tp/Texinfo/Convert/Plaintext.pm
index a3cda7eb74..deea10801e 100644
--- a/tp/Texinfo/Convert/Plaintext.pm
+++ b/tp/Texinfo/Convert/Plaintext.pm
@@ -1306,7 +1306,7 @@ sub process_printindex($$;$)
     $line_nrs{$entry} = $line_nr;
   }
 
-  return '' if (scalar(%line_nrs) == 0);
+  return '' if (scalar(keys(%line_nrs)) == 0);
 
   my $result = '';
   $result .= _add_newline_if_needed($self);



reply via email to

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