texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Patrice Dumas
Date: Sun, 29 Sep 2024 10:32:52 -0400 (EDT)

branch: master
commit 87adaeeea6089887eb8842a9481038f17040a0c3
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri Jul 5 22:30:38 2024 +0200

    * tp/Texinfo/Convert/Plaintext.pm: remove a FIXME on @cartouche, the
    output is already correct.
    
    * tp/Makefile.tres, tp/t/plaintext_tests.t
    (cartouche_and_paragraph_indentation): add a test for cartouche and
    paragraph indentation.
---
 ChangeLog                       |  9 +++++++++
 tp/Makefile.tres                |  1 +
 tp/Texinfo/Convert/Plaintext.pm |  2 --
 tp/t/plaintext_tests.t          | 35 ++++++++++++++++++++++++++++++++++-
 4 files changed, 44 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8099e2dbfe..108d951b49 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-07-05  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Convert/Plaintext.pm: remove a FIXME on @cartouche, the
+       output is already correct.
+
+       * tp/Makefile.tres, tp/t/plaintext_tests.t
+       (cartouche_and_paragraph_indentation): add a test for cartouche and
+       paragraph indentation.
+
 2024-07-05  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/Plaintext.pm (_convert): do not copy
diff --git a/tp/Makefile.tres b/tp/Makefile.tres
index b2716436d2..067fcdd92b 100644
--- a/tp/Makefile.tres
+++ b/tp/Makefile.tres
@@ -1760,6 +1760,7 @@ test_files_generated_list = 
$(test_tap_files_generated_list) \
   t/results/plaintext_tests/at_commands_glued_in_example.pl \
   t/results/plaintext_tests/at_commands_glued_in_paragraph.pl \
   t/results/plaintext_tests/before_accent_punctuation.pl \
+  t/results/plaintext_tests/cartouche_and_paragraph_indentation.pl \
   t/results/plaintext_tests/characters_and_commands_in_var.pl \
   t/results/plaintext_tests/chinese_mixed_with_en.pl \
   t/results/plaintext_tests/chinese_mixed_with_en/res_plaintext \
diff --git a/tp/Texinfo/Convert/Plaintext.pm b/tp/Texinfo/Convert/Plaintext.pm
index 51aad8cbbe..0d99d1b704 100644
--- a/tp/Texinfo/Convert/Plaintext.pm
+++ b/tp/Texinfo/Convert/Plaintext.pm
@@ -3470,8 +3470,6 @@ sub _convert($$)
       } elsif ($cmdname eq 'cartouche') {
         if ($element->{'args'}
             and $element->{'args'}->[0]->{'contents'}) {
-          # FIXME reset the paragraph count in cartouche and use a
-          # specific format_context?
           my $prepended = $self->cdt('@center @b{{cartouche_arg}}',
              {'cartouche_arg' => $element->{'args'}->[0]});
           $prepended->{'type'} = 'frenchspacing';
diff --git a/tp/t/plaintext_tests.t b/tp/t/plaintext_tests.t
index f9bf2d6674..3110cca691 100644
--- a/tp/t/plaintext_tests.t
+++ b/tp/t/plaintext_tests.t
@@ -85,7 +85,7 @@ Before samp. @samp{a}. after samp, w @w{in   w. after dot}  
afterw
 @end quotation
 '],
 # This tests all the possibilities for end sentence related characters
-# ans splitting by commands (also tested in other tests)
+# and splitting by commands (also tested in other tests)
 ['split_punctuation_detection_in_commands',
 'Before @asis{B}@asis{)}@asis{.}]]? Afte@strong{R}@emph{"!}\'? Last'],
 ['html_expanded',
@@ -519,6 +519,39 @@ Para
 @indent
 Para indented.
 
+'],
+['cartouche_and_paragraph_indentation',
+'@node top
+@top top
+
+@node chap
+@chapter chap
+
+aa
+
+bb
+
+@cartouche toto
+
+cc
+
+dd
+
+@end cartouche
+
+@node chap2
+@chapter c2
+
+@cartouche titi
+
+ll m
+
+mm
+
+@end cartouche
+
+oo
+
 '],
 ['nested_code_commands',
 '@code{aA @kbd{fg}}.



reply via email to

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