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 (_convert): add


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Convert/Plaintext.pm (_convert): add a newline after generated menu if needed.
Date: Sat, 04 May 2024 09:08:59 -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 b0380c00d3 * tp/Texinfo/Convert/Plaintext.pm (_convert): add a newline 
after generated menu if needed.
b0380c00d3 is described below

commit b0380c00d3cd46a94b0cc57ee3aaf7ad02e0ff01
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat May 4 15:08:56 2024 +0200

    * tp/Texinfo/Convert/Plaintext.pm (_convert): add a newline after
    generated menu if needed.
---
 ChangeLog                                                           | 5 +++++
 tp/Texinfo/Convert/Plaintext.pm                                     | 4 +---
 tp/t/results/def/text_block_before_defline.pl                       | 1 +
 tp/t/results/menu/appendix_and_associated_part_in_generated_menu.pl | 2 ++
 tp/t/results/menu/part_appendix_in_generated_menu.pl                | 2 ++
 5 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c250cef0d5..3480243220 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-05-04  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Convert/Plaintext.pm (_convert): add a newline after
+       generated menu if needed.
+
 2024-05-04  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Makefile.tres, tp/t/19def.t (comment_index_before_defline)
diff --git a/tp/Texinfo/Convert/Plaintext.pm b/tp/Texinfo/Convert/Plaintext.pm
index dff74a6afe..deb1f11707 100644
--- a/tp/Texinfo/Convert/Plaintext.pm
+++ b/tp/Texinfo/Convert/Plaintext.pm
@@ -626,9 +626,6 @@ sub convert_tree($$)
   return $result;
 }
 
-# the initialization of module specific state is not done in output()
-# as output() is the generic Converter::Convert function, so it needs
-# to be done here by calling _initialize_converter_state.
 sub convert_output_unit($$)
 {
   my ($self, $output_unit) = @_;
@@ -4290,6 +4287,7 @@ sub _convert($$)
                                               $identifiers_target, $node);
         if ($menu_node) {
           $self->_convert($menu_node);
+          _add_newline_if_needed($self);
         }
       }
     }
diff --git a/tp/t/results/def/text_block_before_defline.pl 
b/tp/t/results/def/text_block_before_defline.pl
index 43302098af..82a1169f2b 100644
--- a/tp/t/results/def/text_block_before_defline.pl
+++ b/tp/t/results/def/text_block_before_defline.pl
@@ -640,6 +640,7 @@ 
$result_converted{'plaintext'}->{'text_block_before_defline'} = 'top
 * Menu:
 
 * chapt::
+
 1 Chap
 ******
 
diff --git 
a/tp/t/results/menu/appendix_and_associated_part_in_generated_menu.pl 
b/tp/t/results/menu/appendix_and_associated_part_in_generated_menu.pl
index dbad7854bc..c69d2428b5 100644
--- a/tp/t/results/menu/appendix_and_associated_part_in_generated_menu.pl
+++ b/tp/t/results/menu/appendix_and_associated_part_in_generated_menu.pl
@@ -772,12 +772,14 @@ Appendices
 Chap
 
 * sec::
+
 1 Chap
 ******
 
 * Menu:
 
 * sec::
+
 1.1 Sec
 =======
 
diff --git a/tp/t/results/menu/part_appendix_in_generated_menu.pl 
b/tp/t/results/menu/part_appendix_in_generated_menu.pl
index 830644f350..0122138e10 100644
--- a/tp/t/results/menu/part_appendix_in_generated_menu.pl
+++ b/tp/t/results/menu/part_appendix_in_generated_menu.pl
@@ -711,12 +711,14 @@ Appendices
 Chap
 
 * sec::
+
 1 Chap
 ******
 
 * Menu:
 
 * sec::
+
 1.1 Sec
 =======
 



reply via email to

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