texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/Convert/HTML.pm (_default_format_ele


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Convert/HTML.pm (_default_format_element_footer): to count word split at splaces only, no need to have true words in the array, it is only used for the counting.
Date: Fri, 05 Jan 2024 05:29:52 -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 6b14544b12 * tp/Texinfo/Convert/HTML.pm 
(_default_format_element_footer): to count word split at splaces only, no need 
to have true words in the array, it is only used for the counting.
6b14544b12 is described below

commit 6b14544b12f7d0ca4efc3a91e294d173f0b01307
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri Jan 5 11:29:51 2024 +0100

    * tp/Texinfo/Convert/HTML.pm (_default_format_element_footer): to
    count word split at splaces only, no need to have true words in
    the array, it is only used for the counting.
---
 ChangeLog                  | 6 ++++++
 tp/Texinfo/Convert/HTML.pm | 5 ++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index eac4a3cd61..025641d72d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-01-05  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Convert/HTML.pm (_default_format_element_footer): to
+       count word split at splaces only, no need to have true words in
+       the array, it is only used for the counting.
+
 2024-01-04  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/convert/convert_html.c (convert_menu_comment_type)
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 48d178882d..24cf69ca36 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -7974,7 +7974,10 @@ sub _default_format_element_footer($$$$;$)
           $content = '' if (!defined($content));
           # FIXME it seems that NO-BREAK SPACE and NEXT LINE (NEL) may
           # not be in \h and \v in some case, but not sure which case it is
-          my @cnt = split(/\P{Word}*[\h\v]+\P{Word}*/, $content);
+          # It is supposed to be explained but it is not very clear
+          # https://perldoc.perl.org/perlrecharclass#Whitespace
+          # TODO starting in Perl v5.18 [\h\v] could be replaced by \s
+          my @cnt = split(/[\h\v]+/, $content);
           if (scalar(@cnt) < $self->get_conf('WORDS_IN_PAGE')) {
             $no_footer_word_count = 1;
           }



reply via email to

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