texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/ParserNonXS.pm (_process_remaining_o


From: Gavin D. Smith
Subject: branch master updated: * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line) <close brace>, tp/Texinfo/XS/parsetexi/separator.c (handle_close_brace): If inside brace_command_context element, call end_paragraph before checking what brace command we are closing. This allows the elimination of a duplicate block of code for closing a context brace command.
Date: Mon, 23 Jan 2023 14:57:10 -0500

This is an automated email from the git hooks/post-receive script.

gavin pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 32b7af2bc0 * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line) 
<close brace>, tp/Texinfo/XS/parsetexi/separator.c (handle_close_brace): If 
inside brace_command_context element, call end_paragraph before checking what 
brace command we are closing.  This allows the elimination of a duplicate block 
of code for closing a context brace command.
32b7af2bc0 is described below

commit 32b7af2bc0f2d07ec1c3050a9d6e350200d7f14c
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Mon Jan 23 19:57:00 2023 +0000

    * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line) <close brace>,
    tp/Texinfo/XS/parsetexi/separator.c (handle_close_brace):
    If inside brace_command_context element, call end_paragraph before
    checking what brace command we are closing.  This allows the
    elimination of a duplicate block of code for closing a context
    brace command.
---
 ChangeLog                                          |   9 +
 tp/Texinfo/ParserNonXS.pm                          |  40 ++--
 tp/Texinfo/XS/parsetexi/separator.c                |  33 +---
 .../references_to_top_no_top_output.pl             |  11 +-
 .../res_html/chapter.html                          |   3 +-
 .../res_latex/references_to_top_no_top_output.tex  |   1 -
 .../converters_tests/things_before_setfilename.pl  |   4 +-
 .../things_before_setfilename_no_element.pl        |   4 +-
 tp/t/results/coverage/block_commands.pl            |   8 +-
 .../coverage/punctuation_in_line_commands.pl       |  22 +--
 tp/t/results/coverage_braces/test_image.pl         |   6 +-
 tp/t/results/float/anchor_in_caption.pl            |  11 +-
 tp/t/results/float/cindex_in_caption.pl            |  13 +-
 tp/t/results/float/complex_float.pl                |  18 +-
 .../float/empty_listoffloats_with_floats.pl        |  16 +-
 tp/t/results/float/float_in_block_commands.pl      |  18 +-
 tp/t/results/float/float_with_at_commands.pl       |   7 +-
 tp/t/results/float/footnote_in_caption.pl          |  11 +-
 .../results/float/footnote_in_caption_and_error.pl |   8 +-
 .../float/numbering_captions_listoffloats.pl       | 210 +++++++--------------
 tp/t/results/float/simple.pl                       |   8 +-
 .../float/special_characters_in_float_type.pl      |  10 +-
 tp/t/results/info_tests/error_in_footnote.pl       |   7 +-
 tp/t/results/info_tests/float_long_captions.pl     |  12 +-
 .../invalid_nestings/float_in_style_command.pl     |   4 +-
 tp/t/results/latex_tests/float_and_refs.pl         |  30 ++-
 .../float_and_refs/res_latex/float_and_refs.tex    |   6 -
 tp/t/results/paragraph/commands_in_flushright.pl   |   6 +-
 tp/t/results/preformatted/caption_in_example.pl    |   4 +
 tp/t/results/xml_tests/commands_and_spaces.pl      |  10 +-
 tp/t/results/xml_tests/image_inline_or_not.pl      |   4 +-
 31 files changed, 201 insertions(+), 353 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 29daa157e0..8153b2e3b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2023-01-23  Gavin Smith <gavinsmith0123@gmail.com>
+
+       * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line) <close brace>,
+       tp/Texinfo/XS/parsetexi/separator.c (handle_close_brace):
+       If inside brace_command_context element, call end_paragraph before
+       checking what brace command we are closing.  This allows the
+       elimination of a duplicate block of code for closing a context
+       brace command.
+
 2023-01-23  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/ParserNonXS.pm (_next_text),
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 70d195d531..da95e5a647 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -5800,18 +5800,26 @@ sub _process_remaining_on_line($$$$)
     } elsif ($separator eq '}') {
       # handle_close_brace in XS parser
       _abort_empty_line($self, $current);
+
+      # For footnote and caption closing, when there is a paragraph inside.
+      # This makes the brace command the parent element.
+      if ($current->{'parent'} and $current->{'parent'}->{'type'}
+            and $current->{'parent'}->{'type'} eq 'brace_command_context') {
+         $current = _end_paragraph($self, $current, $source_info);
+      }
+
       if ($current->{'type'} and ($current->{'type'} eq 'bracketed')) {
         # Used in @math
         $current = $current->{'parent'};
-       # the following will not happen for footnote if there is
-       # a paragraph within the footnote
       } elsif ($current->{'parent'}
           and $current->{'parent'}->{'cmdname'}
           and exists($self->{'brace_commands'}
                                      ->{$current->{'parent'}->{'cmdname'}})) {
-        # for math and footnote out of paragraph
         if ($self->{'brace_commands'}
                           ->{$current->{'parent'}->{'cmdname'}} eq 'context') {
+          print STDERR "CLOSING(context command) "
+                        ."\@$current->{'parent'}->{'cmdname'}\n"
+                           if ($self->{'DEBUG'});
           my $command_context = 'ct_brace_command';
           if ($math_commands{$current->{'parent'}->{'cmdname'}}) {
             $command_context = 'ct_math';
@@ -6029,31 +6037,7 @@ sub _process_remaining_on_line($$$$)
                and $current->{'type'} eq 'rawpreformatted') {
         push @{$current->{'contents'}}, {'text' => '}',
                                          'parent' => $current };
-      # footnote caption closing, when there is a paragraph inside.
-      } elsif ($self->_top_context() eq 'ct_brace_command') {
-         # closing the context under broader situations
-         $current = _end_paragraph($self, $current, $source_info);
-         if ($current->{'parent'}
-             and $current->{'parent'}->{'cmdname'}
-             and $self->{'brace_commands'}
-                  ->{$current->{'parent'}->{'cmdname'}} eq 'context') {
-          $self->_pop_context(['ct_brace_command'], $source_info, $current,
-                     "for brace isolated $current->{'parent'}->{'cmdname'}");
-          print STDERR "CLOSING(context command) "
-                        ."\@$current->{'parent'}->{'cmdname'}\n"
-                           if ($self->{'DEBUG'});
-          my $closed_command = $current->{'parent'}->{'cmdname'};
-          if ($closed_command eq 'footnote') {
-            $self->{'nesting_context'}->{'footnote'} -= 1;
-          } elsif ($closed_command eq 'caption'
-                   or $closed_command eq 'shortcaption') {
-            $self->{'nesting_context'}->{'caption'} -= 1;
-          }
-          _register_global_command($self, $current->{'parent'}, $source_info);
-          $current = $current->{'parent'}->{'parent'};
-          $current = _begin_preformatted($self, $current)
-             if ($close_preformatted_commands{$closed_command});
-        }
+
       } else {
         $self->_line_error(sprintf(__("misplaced %c"),
                                  ord('}')), $source_info);
diff --git a/tp/Texinfo/XS/parsetexi/separator.c 
b/tp/Texinfo/XS/parsetexi/separator.c
index 7402516bbc..2918f4993b 100644
--- a/tp/Texinfo/XS/parsetexi/separator.c
+++ b/tp/Texinfo/XS/parsetexi/separator.c
@@ -239,6 +239,11 @@ handle_close_brace (ELEMENT *current, char **line_inout)
 
   abort_empty_line (&current, NULL);
 
+  /* For footnote and caption closing, when there is a paragraph inside.
+     This makes the brace command the parent element. */
+  if (current->parent && current->parent->type == ET_brace_command_context)
+    current = end_paragraph (current, 0, 0);
+
   if (current->type == ET_bracketed)
     {
       /* Used in @math */
@@ -250,6 +255,7 @@ handle_close_brace (ELEMENT *current, char **line_inout)
       enum command_id closed_command;
       if (command_data(current->parent->cmd).data == BRACE_context)
         {
+          debug ("CLOSING(context command)");
           if (current->parent->cmd == CM_math)
             {
               if (pop_context () != ct_math)
@@ -526,33 +532,6 @@ handle_close_brace (ELEMENT *current, char **line_inout)
       add_to_element_contents (current, e);
       goto funexit;
     }
-  /* context brace command (e.g. @footnote) when there is a paragraph inside */
-  else if (current_context() == ct_brace_command)
-    {
-      current = end_paragraph (current, 0, 0);
-      if (current->parent
-          && (command_flags(current->parent) & CF_brace)
-          && (command_data(current->parent->cmd).data == BRACE_context))
-        {
-          enum command_id closed_command;
-          if (pop_context () != ct_brace_command)
-            fatal ("context brace command context expected");
-          debug ("CLOSING(context command)");
-          closed_command = current->parent->cmd;
-          counter_pop (&count_remaining_args);
-
-          if (closed_command == CM_footnote)
-            nesting_context.footnote--;
-          else if (closed_command == CM_caption
-                     || closed_command == CM_shortcaption)
-            nesting_context.caption--;
-
-          register_global_command (current->parent);
-          current = current->parent->parent;
-          if (close_preformatted_command(closed_command))
-            current = begin_preformatted (current);
-        }
-    }
   else
     {
       line_error ("misplaced }");
diff --git a/tp/t/results/converters_tests/references_to_top_no_top_output.pl 
b/tp/t/results/converters_tests/references_to_top_no_top_output.pl
index 80533fa350..0e3d4fc04d 100644
--- a/tp/t/results/converters_tests/references_to_top_no_top_output.pl
+++ b/tp/t/results/converters_tests/references_to_top_no_top_output.pl
@@ -504,7 +504,8 @@ $result_trees{'references_to_top_no_top_output'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -1034,7 +1035,8 @@ $result_trees{'references_to_top_no_top_output'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -1255,7 +1257,6 @@ In Flist
 .
 
 
-
 End of Top
 
 1 Chap
@@ -1273,7 +1274,6 @@ a in paragraph in top
 list, Main Flist
 In Main
 
-
 ';
 
 $result_sectioning{'references_to_top_no_top_output'} = {
@@ -1497,8 +1497,7 @@ see <a class="pxref" href="#a-in-paragraph-in-top">a in 
paragraph in top</a>
 
 <div class="float" id="Main-Flist">
 <p>In Main
-</p>
-<div class="caption"><p><strong class="strong">list 1.1: </strong>Caption 
Main</p></div></div>
+</p><div class="caption"><p><strong class="strong">list 1.1: </strong>Caption 
Main</p></div></div>
 <dl class="listoffloats">
 <dt><a href="#My-Flist">list 1</a></dt><dd 
class="caption-in-listoffloats"><p>Caption Flist. </p></dd>
 <dt><a href="#Main-Flist">list 1.1</a></dt><dd 
class="caption-in-listoffloats"><p>Caption Main</p></dd>
diff --git 
a/tp/t/results/converters_tests/references_to_top_no_top_output/res_html/chapter.html
 
b/tp/t/results/converters_tests/references_to_top_no_top_output/res_html/chapter.html
index 9cf44f4925..1ef7d7dee1 100644
--- 
a/tp/t/results/converters_tests/references_to_top_no_top_output/res_html/chapter.html
+++ 
b/tp/t/results/converters_tests/references_to_top_no_top_output/res_html/chapter.html
@@ -59,8 +59,7 @@ see <a class="pxref" 
href="index.html#a-in-paragraph-in-top">a in paragraph in t
 
 <div class="float" id="Main-Flist">
 <p>In Main
-</p>
-<div class="caption"><p><strong class="strong">list 1.1: </strong>Caption 
Main</p></div></div>
+</p><div class="caption"><p><strong class="strong">list 1.1: </strong>Caption 
Main</p></div></div>
 <dl class="listoffloats">
 <dt><a href="index.html#My-Flist">list 1</a></dt><dd 
class="caption-in-listoffloats"><p>Caption Flist. </p></dd>
 <dt><a href="#Main-Flist">list 1.1</a></dt><dd 
class="caption-in-listoffloats"><p>Caption Main</p></dd>
diff --git 
a/tp/t/results/converters_tests/references_to_top_no_top_output/res_latex/references_to_top_no_top_output.tex
 
b/tp/t/results/converters_tests/references_to_top_no_top_output/res_latex/references_to_top_no_top_output.tex
index 1bb2f820a7..9bfb6d3e51 100644
--- 
a/tp/t/results/converters_tests/references_to_top_no_top_output/res_latex/references_to_top_no_top_output.tex
+++ 
b/tp/t/results/converters_tests/references_to_top_no_top_output/res_latex/references_to_top_no_top_output.tex
@@ -74,7 +74,6 @@ see \hyperref[anchor:a-in-paragraph-in-top]{[a in paragraph 
in top], page~\pager
 \begin{TexinfoFloatlist}
 In Main
 \caption{Caption Main}
-
 \label{anchor:Main-Flist}%
 \end{TexinfoFloatlist}
 
diff --git a/tp/t/results/converters_tests/things_before_setfilename.pl 
b/tp/t/results/converters_tests/things_before_setfilename.pl
index 0225e9eb93..2b8c501c54 100644
--- a/tp/t/results/converters_tests/things_before_setfilename.pl
+++ b/tp/t/results/converters_tests/things_before_setfilename.pl
@@ -462,7 +462,8 @@ $result_trees{'things_before_setfilename'} = {
                 },
                 {
                   'text' => '
-'
+',
+                  'type' => 'spaces_after_close_brace'
                 },
                 {
                   'args' => [
@@ -1149,7 +1150,6 @@ In float
 
 
 
-
 * An anchor::                menu entry pointing to the anchor.
 
 
diff --git 
a/tp/t/results/converters_tests/things_before_setfilename_no_element.pl 
b/tp/t/results/converters_tests/things_before_setfilename_no_element.pl
index 568cfad6c0..7429121189 100644
--- a/tp/t/results/converters_tests/things_before_setfilename_no_element.pl
+++ b/tp/t/results/converters_tests/things_before_setfilename_no_element.pl
@@ -462,7 +462,8 @@ $result_trees{'things_before_setfilename_no_element'} = {
                 },
                 {
                   'text' => '
-'
+',
+                  'type' => 'spaces_after_close_brace'
                 },
                 {
                   'args' => [
@@ -995,7 +996,6 @@ In float
 
 
 
-
 * An anchor::                menu entry pointing to the anchor.
 
 
diff --git a/tp/t/results/coverage/block_commands.pl 
b/tp/t/results/coverage/block_commands.pl
index 772e6fe54f..38de811d20 100644
--- a/tp/t/results/coverage/block_commands.pl
+++ b/tp/t/results/coverage/block_commands.pl
@@ -231,7 +231,8 @@ $result_trees{'block_commands'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -325,7 +326,6 @@ a float, b float
 In float
 
 
-
 ';
 
 $result_errors{'block_commands'} = [];
@@ -369,7 +369,6 @@ $result_converted{'plaintext'}->{'block_commands'} = 'in 
group
 
 In float
 
-
 a float 1: in caption
 
 in caption
@@ -387,7 +386,6 @@ $result_converted{'html_text'}->{'block_commands'} = '
 <p>In float
 </p>
 
-
 <div class="caption"><p><strong class="strong">a float 1: </strong>in caption
 </p>
 <p>in caption</p></div></div>';
@@ -427,7 +425,6 @@ In float
 \\caption{in caption
 
 in caption}
-
 \\label{anchor:b-float}%
 \\end{TexinfoFloatafloat}
 ';
@@ -442,7 +439,6 @@ $result_converted{'docbook'}->{'block_commands'} = '
 <para>In float
 </para>
 
-
 ';
 
 1;
diff --git a/tp/t/results/coverage/punctuation_in_line_commands.pl 
b/tp/t/results/coverage/punctuation_in_line_commands.pl
index 470f69a686..a9265eb8ab 100644
--- a/tp/t/results/coverage/punctuation_in_line_commands.pl
+++ b/tp/t/results/coverage/punctuation_in_line_commands.pl
@@ -340,7 +340,8 @@ $result_trees{'punctuation_in_line_commands'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -462,7 +463,8 @@ $result_trees{'punctuation_in_line_commands'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -833,13 +835,11 @@ exdent quotation! After punc
 float type! After punc, float label! After punc
 In float
 
-
 float type! After punc, label with caption
 In float with caption.
 
 
 
-
 heading! After punc
 ===================
 
@@ -987,12 +987,10 @@ exdent quotation!  After punc
 
 In float
 
-
 float type! After punc 1: shortcaption!  After punc
 
 In float with caption.
 
-
 float type! After punc 2: caption!  After punc
 
 * Menu:
@@ -1012,7 +1010,7 @@ titlefont! After punc
 
 * Menu:
 
-* index! After punc:                     node! After punc.     (line 25)
+* index! After punc:                     node! After punc.     (line 23)
 
 top! After punc
 ';
@@ -1033,12 +1031,10 @@ 
$result_converted{'html_text'}->{'punctuation_in_line_commands'} = '
 
 <div class="float" id="float-label_0021-After-punc">
 <p>In float
-</p>
-<div class="shortcaption"><p><strong class="strong">float type! After punc 1: 
</strong>shortcaption! After punc</p></div></div>
+</p><div class="shortcaption"><p><strong class="strong">float type! After punc 
1: </strong>shortcaption! After punc</p></div></div>
 <div class="float" id="label-with-caption">
 <p>In float with caption.
-</p>
-<div class="caption"><p><strong class="strong">float type! After punc 2: 
</strong>caption! After punc</p></div></div>
+</p><div class="caption"><p><strong class="strong">float type! After punc 2: 
</strong>caption! After punc</p></div></div>
 <dl class="listoffloats">
 <dt><a href="#float-label_0021-After-punc">float type! After punc 
1</a></dt><dd class="shortcaption-in-listoffloats"><p>shortcaption! After 
punc</p></dd>
 <dt><a href="#label-with-caption">float type! After punc 2</a></dt><dd 
class="caption-in-listoffloats"><p>caption! After punc</p></dd>
@@ -1128,14 +1124,12 @@ exdent quotation! After punc
 \\begin{TexinfoFloatfloattypeAfterpunc}
 In float
 \\caption{shortcaption! After punc}
-
 \\label{anchor:float-label_0021-After-punc}%
 \\end{TexinfoFloatfloattypeAfterpunc}
 
 \\begin{TexinfoFloatfloattypeAfterpunc}
 In float with caption.
 \\caption{caption! After punc}
-
 \\label{anchor:label-with-caption}%
 \\end{TexinfoFloatfloattypeAfterpunc}
 
@@ -1168,12 +1162,10 @@ 
$result_converted{'docbook'}->{'punctuation_in_line_commands'} = '<chapter label
 <anchor id="float-label_0021-After-punc"/>
 <para>In float
 </para>
-
 <anchor id="label-with-caption"/>
 <para>In float with caption.
 </para>
 
-
 <indexterm role="cp"><primary>index! After punc</primary></indexterm>
 
 <bridgehead renderas="sect1">heading! After punc</bridgehead>
diff --git a/tp/t/results/coverage_braces/test_image.pl 
b/tp/t/results/coverage_braces/test_image.pl
index 634b91a07f..514981dad2 100644
--- a/tp/t/results/coverage_braces/test_image.pl
+++ b/tp/t/results/coverage_braces/test_image.pl
@@ -2374,7 +2374,8 @@ $result_trees{'test_image'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -2568,7 +2569,6 @@ In text f@i--le..  a@<"%@  < & @ % " .
 
 
 
-
 ';
 
 $result_nodes{'test_image'} = {
@@ -2905,7 +2905,6 @@ In text <img class="image" 
src="f%40i--le..%20%20a%40%3c%22%25%40%20%20%3c%20%26
 <p>In text <img class="image" 
src="f%40i--le..%20%20a%40%3c%22%25%40%20%20%3c%20%26%20%40%20%25%20%22%20.ext%40i--le..%20%20a%40%3c%22%25%40%20%20%3c%20%26%20%40%20%25%20%22%20"
 alt="alt &icirc;&ndash;le..  a
 &lt;&quot;%@&nbsp;&nbsp;&lt;&nbsp;&amp;&nbsp;@&nbsp;%&nbsp;&quot;&nbsp;">.
 </p>
-
 <div class="caption"><img class="image" 
src="f%40i--le..%20%20a%40%3c%22%25%40%20%20%3c%20%26%20%40%20%25%20%22%20.ext%40i--le..%20%20a%40%3c%22%25%40%20%20%3c%20%26%20%40%20%25%20%22%20"
 alt="f@i--le..  
a@&lt;&quot;%@&nbsp;&nbsp;&lt;&nbsp;&amp;&nbsp;@&nbsp;%&nbsp;&quot;&nbsp;">
 
 <p><strong class="strong">Image 1: </strong>In text <img class="image" 
src="f%40i--le..%20%20a%40%3c%22%25%40%20%20%3c%20%26%20%40%20%25%20%22%20.ext%40i--le..%20%20a%40%3c%22%25%40%20%20%3c%20%26%20%40%20%25%20%22%20"
 alt="alt &icirc;&ndash;le..  a
@@ -3046,7 +3045,6 @@ In text [alt î-le..  a
 In text [alt î-le..  a
 <"%@  < & @ % " ].
 
-
 Image 1: [f@i--le..  a@<"%@  < & @ % " ]
 
 In text [alt î-le..  a
diff --git a/tp/t/results/float/anchor_in_caption.pl 
b/tp/t/results/float/anchor_in_caption.pl
index 440bffdfac..e7a00fa43b 100644
--- a/tp/t/results/float/anchor_in_caption.pl
+++ b/tp/t/results/float/anchor_in_caption.pl
@@ -163,7 +163,8 @@ $result_trees{'anchor_in_caption'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -267,7 +268,6 @@ $result_texts{'anchor_in_caption'} = '
 
 fl, label
 In float.
-
 ';
 
 $result_nodes{'anchor_in_caption'} = {
@@ -327,7 +327,6 @@ $result_converted{'plaintext'}->{'anchor_in_caption'} = '* 
Menu:
 
 In float.
 
-
 fl 1: in caption
 ';
 
@@ -343,14 +342,13 @@ File: ,  Node: Top,  Up: (dir)
 
 In float.
 
-
 fl 1: in caption
 
 
 Tag Table:
 Node: Top27
 Ref: label123
-Ref: in anchor151
+Ref: in anchor150
 
 End Tag Table
 
@@ -388,8 +386,7 @@ $result_converted{'html'}->{'anchor_in_caption'} = 
'<!DOCTYPE html>
 
 <div class="float" id="label">
 <p>In float.
-</p>
-<div class="caption"><p><strong class="strong">fl 1: </strong>in caption<a 
class="anchor" id="in-anchor"></a></p></div></div>
+</p><div class="caption"><p><strong class="strong">fl 1: </strong>in caption<a 
class="anchor" id="in-anchor"></a></p></div></div>
 
 
 </body>
diff --git a/tp/t/results/float/cindex_in_caption.pl 
b/tp/t/results/float/cindex_in_caption.pl
index 6a7ca21bc2..f6852ecda2 100644
--- a/tp/t/results/float/cindex_in_caption.pl
+++ b/tp/t/results/float/cindex_in_caption.pl
@@ -180,7 +180,8 @@ $result_trees{'cindex_in_caption'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -335,7 +336,6 @@ fl, label
 In float.
 
 
-
 ';
 
 $result_nodes{'cindex_in_caption'} = {
@@ -404,12 +404,11 @@ $result_converted{'plaintext'}->{'cindex_in_caption'} = 
'* Menu:
 
 In float.
 
-
 fl 1: in caption
 
 * Menu:
 
-* index entry:                           Top.                   (line 7)
+* index entry:                           Top.                   (line 6)
 
 ';
 
@@ -425,13 +424,12 @@ File: ,  Node: Top,  Up: (dir)
 
 In float.
 
-
 fl 1: in caption
 
 [index]
 * Menu:
 
-* index entry:                           Top.                  (line 10)
+* index entry:                           Top.                   (line 9)
 
 
 
@@ -486,8 +484,7 @@ th.sections-header-printindex {text-align:left; 
padding-left: 1em}
 
 <div class="float" id="label">
 <p>In float.
-</p>
-<div class="caption"><p><strong class="strong">fl 1: </strong>in caption
+</p><div class="caption"><p><strong class="strong">fl 1: </strong>in caption
 <a class="index-entry-id" id="index-index-entry"></a>
 </p></div></div>
 <div class="printindex cp-printindex">
diff --git a/tp/t/results/float/complex_float.pl 
b/tp/t/results/float/complex_float.pl
index 1f61f28b76..3474202f99 100644
--- a/tp/t/results/float/complex_float.pl
+++ b/tp/t/results/float/complex_float.pl
@@ -1849,7 +1849,8 @@ $result_trees{'complex_float'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'text' => '
@@ -2085,7 +2086,8 @@ $result_trees{'complex_float'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'text' => '
@@ -3217,7 +3219,8 @@ $result_trees{'complex_float'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'text' => '
@@ -3548,8 +3551,6 @@ TeX and te\'i^an_url AND it is @verb  a word !@ AE.
 
 
 
-
-
 1 A chapter
 ***********
 
@@ -3559,7 +3560,6 @@ Float text of a float with a lot of features.
 
 
 
-
 text with a lot of features.
 
 ';
@@ -3805,8 +3805,6 @@ A ref.  *Note xref Text with features: Top.  A footnote.  
(1).
 
 TeX and _téî<an_url>_ AND it is @verb  a word !@ Æ.
 
-
-
 Text 1: An example of float caption...  An example.
      example
 
@@ -3837,7 +3835,6 @@ TeX and _téî<an_url>_ AND it is @verb  a word !@ Æ.
 
 Float text of a float with a lot of features.
 
-
 Text 1.1: An example of float caption...  2 An example 2.
      example 2
 
@@ -3972,8 +3969,6 @@ A footnote.
 </p>
 
 
-
-
 <div class="caption"><p><strong class="strong">Text 1: </strong>An example of 
float caption<small class="enddots">...</small>
 An example.
 </p><div class="example">
@@ -4026,7 +4021,6 @@ Previous: <a href="#Top" accesskey="p" rel="prev">Test 
floats</a>, Up: <a href="
 <p>Float text of a float with a lot of features.
 </p>
 
-
 <div class="caption"><p><strong class="strong">Text 1.1: </strong>An example 
of float caption<small class="enddots">...</small> 2
 An example 2.
 </p><div class="example">
diff --git a/tp/t/results/float/empty_listoffloats_with_floats.pl 
b/tp/t/results/float/empty_listoffloats_with_floats.pl
index 9571b5cd6b..43a90a6feb 100644
--- a/tp/t/results/float/empty_listoffloats_with_floats.pl
+++ b/tp/t/results/float/empty_listoffloats_with_floats.pl
@@ -163,7 +163,8 @@ $result_trees{'empty_listoffloats_with_floats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -333,7 +334,8 @@ $result_trees{'empty_listoffloats_with_floats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -445,12 +447,10 @@ Label no caption.
 label2
 Label and caption.
 
-
 no label no caption
 
 no label caption
 
-
 ';
 
 $result_errors{'empty_listoffloats_with_floats'} = [];
@@ -524,14 +524,12 @@ 
$result_converted{'plaintext'}->{'empty_listoffloats_with_floats'} = 'Label no c
 1
 Label and caption.
 
-
 2: caption with label
 
 no label no caption
 
 no label caption
 
-
 caption no label
 
 * Menu:
@@ -565,15 +563,13 @@ 
$result_converted{'html'}->{'empty_listoffloats_with_floats'} = '<!DOCTYPE html>
 </p><div class="type-number-float"><p><strong 
class="strong">1</strong></p></div></div>
 <div class="float" id="label2">
 <p>Label and caption.
-</p>
-<div class="caption"><p><strong class="strong">2: </strong>caption with 
label</p></div></div>
+</p><div class="caption"><p><strong class="strong">2: </strong>caption with 
label</p></div></div>
 <div class="float">
 <p>no label no caption
 </p></div>
 <div class="float">
 <p>no label caption
-</p>
-<div class="caption"><p>caption no label</p></div></div>
+</p><div class="caption"><p>caption no label</p></div></div>
 <dl class="listoffloats">
 <dt><a href="#label1">1</a></dt><dd></dd>
 <dt><a href="#label2">2</a></dt><dd class="caption-in-listoffloats"><p>caption 
with label</p></dd>
diff --git a/tp/t/results/float/float_in_block_commands.pl 
b/tp/t/results/float/float_in_block_commands.pl
index cb790d5cee..b81c6d4db8 100644
--- a/tp/t/results/float/float_in_block_commands.pl
+++ b/tp/t/results/float/float_in_block_commands.pl
@@ -77,6 +77,10 @@ $result_trees{'float_in_block_commands'} = {
                     'macro' => ''
                   }
                 },
+                {
+                  'text' => '',
+                  'type' => 'spaces_after_close_brace'
+                },
                 {
                   'contents' => [
                     {
@@ -243,7 +247,8 @@ $result_trees{'float_in_block_commands'} = {
                 },
                 {
                   'text' => '
-'
+',
+                  'type' => 'spaces_after_close_brace'
                 },
                 {
                   'args' => [
@@ -402,7 +407,8 @@ $result_trees{'float_in_block_commands'} = {
                 },
                 {
                   'text' => '
-'
+',
+                  'type' => 'spaces_after_close_brace'
                 },
                 {
                   'args' => [
@@ -540,10 +546,8 @@ $result_texts{'float_in_block_commands'} = 'Text, in 
example
 
 Text, in quotation
 
-
 Text, in cartouche
 
-
 ';
 
 $result_errors{'float_in_block_commands'} = [];
@@ -634,10 +638,8 @@ 
$result_floats{'float_in_block_commands'}{'Text'}[2]{'extra'}{'caption'}{'extra'
 $result_converted{'plaintext'}->{'float_in_block_commands'} = '
      Text 1: float in example
 
-
      Text 2: float in quotation
 
-
 Text 3: float in cartouche
 
 ';
@@ -674,12 +676,10 @@ div.example {margin-left: 3.2em}
 
 <blockquote class="quotation">
 <div class="float" id="in-quotation">
-
 <div class="caption"><p><strong class="strong">Text 2: </strong>float in 
quotation</p></div></div></blockquote>
 
 <table class="cartouche" border="1"><tr><td>
 <div class="float" id="in-cartouche">
-
 <div class="caption"><p><strong class="strong">Text 3: </strong>float in 
cartouche</p></div></div></td></tr></table>
 
 
@@ -794,7 +794,6 @@ roundcorner=10pt}
 \\begin{quote}
 \\begin{TexinfoFloatText}
 \\caption{float in quotation}
-
 \\label{anchor:in-quotation}%
 \\end{TexinfoFloatText}
 \\end{quote}
@@ -802,7 +801,6 @@ roundcorner=10pt}
 \\begin{mdframed}[style=Texinfocartouche]
 \\begin{Texinfononfloatingfloat}
 \\captionof{TexinfoFloatText}{float in cartouche}
-
 \\label{anchor:in-cartouche}%
 \\end{Texinfononfloatingfloat}
 \\end{mdframed}
diff --git a/tp/t/results/float/float_with_at_commands.pl 
b/tp/t/results/float/float_with_at_commands.pl
index cc6beb092c..0d1c6724f4 100644
--- a/tp/t/results/float/float_with_at_commands.pl
+++ b/tp/t/results/float/float_with_at_commands.pl
@@ -228,7 +228,8 @@ $result_trees{'float_with_at_commands'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'text' => '
@@ -396,7 +397,6 @@ Ceci est notre premie`re entre\'e.
 
 
 
-
 ';
 
 $result_errors{'float_with_at_commands'} = [];
@@ -442,7 +442,6 @@ 
$result_floats{'float_with_at_commands'}{"entr\x{e9}e"}[0]{'extra'}{'caption'}{'
 
 $result_converted{'plaintext'}->{'float_with_at_commands'} = 'Ceci est notre 
première entrée.
 
-
 entrée 1: La première entrée est importante
 
 * Menu:
@@ -474,7 +473,6 @@ $result_converted{'html'}->{'float_with_at_commands'} = 
'<!DOCTYPE html>
 
 <p>Ceci est notre premi&egrave;re entr&eacute;e.
 </p>
-
 <div class="caption"><p><strong class="strong">entr&eacute;e 1: </strong>La 
premi&egrave;re entr&eacute;e est importante</p></div></div>
 
 <dl class="listoffloats">
@@ -562,7 +560,6 @@ $result_converted{'latex'}->{'float_with_at_commands'} = 
'\\documentclass{book}
 Ceci est notre premi\\`{e}re entr\\\'{e}e.
 \\caption{La premi\\`{e}re entr\\\'{e}e est importante}
 
-
 \\label{anchor:premi_00e8re-entr_00e9e}%
 \\end{TexinfoFloatentree}
 
diff --git a/tp/t/results/float/footnote_in_caption.pl 
b/tp/t/results/float/footnote_in_caption.pl
index 76ed612f85..99b266f0de 100644
--- a/tp/t/results/float/footnote_in_caption.pl
+++ b/tp/t/results/float/footnote_in_caption.pl
@@ -162,7 +162,8 @@ $result_trees{'footnote_in_caption'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -265,7 +266,6 @@ $result_texts{'footnote_in_caption'} = '
 
 fl, label
 In float.
-
 ';
 
 $result_nodes{'footnote_in_caption'} = {
@@ -325,7 +325,6 @@ $result_converted{'plaintext'}->{'footnote_in_caption'} = 
'* Menu:
 
 In float.
 
-
 fl 1: in caption(1)
 
    ---------- Footnotes ----------
@@ -346,7 +345,6 @@ File: ,  Node: Top,  Up: (dir)
 
 In float.
 
-
 fl 1: in caption(1)
 
    ---------- Footnotes ----------
@@ -358,7 +356,7 @@ fl 1: in caption(1)
 Tag Table:
 Node: Top27
 Ref: label126
-Ref: Top-Footnote-1195
+Ref: Top-Footnote-1194
 
 End Tag Table
 
@@ -396,8 +394,7 @@ $result_converted{'html'}->{'footnote_in_caption'} = 
'<!DOCTYPE html>
 
 <div class="float" id="label">
 <p>In float.
-</p>
-<div class="caption"><p><strong class="strong">fl 1: </strong>in caption<a 
class="footnote" id="DOCF1" href="#FOOT1"><sup>2</sup></a></p></div></div><div 
class="footnotes-segment">
+</p><div class="caption"><p><strong class="strong">fl 1: </strong>in caption<a 
class="footnote" id="DOCF1" href="#FOOT1"><sup>2</sup></a></p></div></div><div 
class="footnotes-segment">
 <hr>
 <h4 class="footnotes-heading">Footnotes</h4>
 
diff --git a/tp/t/results/float/footnote_in_caption_and_error.pl 
b/tp/t/results/float/footnote_in_caption_and_error.pl
index c0e007f6b1..28f73adfe0 100644
--- a/tp/t/results/float/footnote_in_caption_and_error.pl
+++ b/tp/t/results/float/footnote_in_caption_and_error.pl
@@ -170,7 +170,8 @@ $result_trees{'footnote_in_caption_and_error'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -273,7 +274,6 @@ $result_texts{'footnote_in_caption_and_error'} = '
 
 fl, label
 In float.
-
 ';
 
 $result_nodes{'footnote_in_caption_and_error'} = {
@@ -343,7 +343,6 @@ 
$result_converted{'plaintext'}->{'footnote_in_caption_and_error'} = '* Menu:
 
 In float.
 
-
 fl 1: in caption(1)
 
    ---------- Footnotes ----------
@@ -380,8 +379,7 @@ 
$result_converted{'html'}->{'footnote_in_caption_and_error'} = '<!DOCTYPE html>
 
 <div class="float" id="label">
 <p>In float.
-</p>
-<div class="caption"><p><strong class="strong">fl 1: </strong>in caption<a 
class="footnote" id="DOCF1" href="#FOOT1"><sup>2</sup></a></p></div></div><div 
class="footnotes-segment">
+</p><div class="caption"><p><strong class="strong">fl 1: </strong>in caption<a 
class="footnote" id="DOCF1" href="#FOOT1"><sup>2</sup></a></p></div></div><div 
class="footnotes-segment">
 <hr>
 <h4 class="footnotes-heading">Footnotes</h4>
 
diff --git a/tp/t/results/float/numbering_captions_listoffloats.pl 
b/tp/t/results/float/numbering_captions_listoffloats.pl
index 0cc2ac244a..9ed282fd5f 100644
--- a/tp/t/results/float/numbering_captions_listoffloats.pl
+++ b/tp/t/results/float/numbering_captions_listoffloats.pl
@@ -152,7 +152,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -195,7 +196,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -314,7 +316,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -344,7 +347,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -462,7 +466,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -492,7 +497,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -767,7 +773,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -797,7 +804,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -909,7 +917,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -939,7 +948,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -1064,7 +1074,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -1094,7 +1105,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -1591,7 +1603,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -1720,7 +1733,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -1973,7 +1987,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -2098,7 +2113,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -2128,7 +2144,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -2253,7 +2270,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -2283,7 +2301,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -2848,7 +2867,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -2878,7 +2898,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -2995,7 +3016,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -3025,7 +3047,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -3227,7 +3250,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -3257,7 +3281,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -3548,7 +3573,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -3578,7 +3604,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -3773,7 +3800,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -3803,7 +3831,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -3925,7 +3954,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -3955,7 +3985,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -4152,7 +4183,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -4182,7 +4214,8 @@ $result_trees{'numbering_captions_listoffloats'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -5229,21 +5262,15 @@ $result_texts{'numbering_captions_listoffloats'} = 
'Test floats
 Text, text with a lot of features
 
 
-
-
 Text
 No label but caption and shortcaption.
 
 
-
-
 label but no type
 No type but caption and shortcaption.
 
 
 
-
-
 label but no type and no caption
 No type but label and no caption nor shortcaption.
 
@@ -5254,20 +5281,14 @@ No label, no type, no caption no shortcaption.
 
 No label, no type, but caption and shortcaption.
 
-
-
 label but no type 2
 Second float with no type.
 
 
-
-
 Warning, warning in top
 A warning
 
 
-
-
 * chapter::
 * Unnumbered::
 * Chapter with unnumbsubsec::
@@ -5281,27 +5302,20 @@ Text, text in chapter
 Text in chapter
 
 
-
 Text, float with a lot of features and no shortcaption
 
-
 the\'ore`me, theoreme
 A the\'ore`me
 
 
-
 label but no type in chapter
 float with no type.
 
 
-
-
 Warning, warning in chapter
 A warning
 
 
-
-
 * section::
 
 1.1 A section
@@ -5318,15 +5332,11 @@ Unnumbered
 * Section within unnumbered::
 Text, unnumbered float
 unnum
-
-
 label but no type in unnumbered
 float with no type.
 
 
 
-
-
 Section within unnumbered
 =========================
 
@@ -5334,8 +5344,6 @@ Section within unnumbered
 Text, Section within unnumbered float
 Section within unnumbered
 
-
-
 2 Chapter with unnumbsubsec
 ***************************
 
@@ -5343,22 +5351,16 @@ Section within unnumbered
 Text, Chapter with subsec float
 Chap
 
-
-
 unnumbered sec
 ==============
 
 Text, unnumbered sec float
 Chap
 
-
-
 label but no type in unnumbered subsec in chapter
 float with no type.
 
 
-
-
 Appendix A Appendix for float
 *****************************
 
@@ -5366,8 +5368,6 @@ Text, appendix sec float
 
 Appendix
 
-
-
 list of floats
 **************
 
@@ -6600,20 +6600,14 @@ 
$result_floats{'numbering_captions_listoffloats'}{"th\x{e9}or\x{e8}me"}[0]{'extr
 $result_converted{'plaintext'}->{'numbering_captions_listoffloats'} = 'Test 
floats
 ***********
 
-
-
 Text 1: An example of float caption...
 
 No label but caption and shortcaption.
 
-
-
 Text: C No label
 
 No type but caption and shortcaption.
 
-
-
 1: C No type
 
 No type but label and no caption nor shortcaption.
@@ -6623,20 +6617,14 @@ No label, no type, no caption no shortcaption.
 
 No label, no type, but caption and shortcaption.
 
-
-
 C No label, no type, but caption and shortcaption.
 
 Second float with no type.
 
-
-
 3: C No type 2
 
 A warning
 
-
-
 Warning 1: C A warning
 
 1 A chapter
@@ -6644,27 +6632,20 @@ Warning 1: C A warning
 
 Text in chapter
 
-
 Text 1.1: C Text in chapter
 
-
 Text 1.2: An example of float caption, no shortcaption...
 
 A théorème
 
-
 théorème 1.1: C A théorème
 
 float with no type.
 
-
-
 1.1: C No type in chapter
 
 A warning
 
-
-
 Warning 1.1: C A warning in chapter
 
 1.1 A section
@@ -6678,14 +6659,10 @@ Unnumbered
 
 unnum
 
-
-
 Text 5: C unnumbered float
 
 float with no type.
 
-
-
 5: C No type in unnumbered
 
 Section within unnumbered
@@ -6693,8 +6670,6 @@ Section within unnumbered
 
 Section within unnumbered
 
-
-
 Text 6: C Section within unnumbered
 
 2 Chapter with unnumbsubsec
@@ -6702,8 +6677,6 @@ Text 6: C Section within unnumbered
 
 Chap
 
-
-
 Text 2.1: C Chapter with subsec
 
 unnumbered sec
@@ -6711,14 +6684,10 @@ unnumbered sec
 
 Chap
 
-
-
 Text 2.2: C unnumbered sec float
 
 float with no type.
 
-
-
 2.1: C No type in unnumbered subsec in chapter
 
 Appendix A Appendix for float
@@ -6726,8 +6695,6 @@ Appendix A Appendix for float
 
 Appendix
 
-
-
 Text A.1: C appendix sec float
 
 list of floats
@@ -6796,20 +6763,14 @@ Next: <a href="#chapter" accesskey="n" rel="next">A 
chapter</a> &nbsp; </p>
 
 <div class="float" id="text-with-a-lot-of-features">
 
-
-
 <div class="caption"><p><strong class="strong">Text 1: </strong>An example of 
float caption<small class="enddots">...</small></p></div></div>
 <div class="float">
 <p>No label but caption and shortcaption.
 </p>
-
-
 <div class="caption"><p><strong class="strong">Text: </strong>C No 
label</p></div></div>
 <div class="float" id="label-but-no-type">
 <p>No type but caption and shortcaption.
 </p>
-
-
 <div class="caption"><p><strong class="strong">1: </strong>C No 
type</p></div></div>
 
 <div class="float" id="label-but-no-type-and-no-caption">
@@ -6823,20 +6784,14 @@ Next: <a href="#chapter" accesskey="n" rel="next">A 
chapter</a> &nbsp; </p>
 </div>
 <div class="float">
 <p>No label, no type, but caption and shortcaption.
-</p>
-
-<div class="caption"><p>C No label, no type, but caption and 
shortcaption.</p></div></div>
+</p><div class="caption"><p>C No label, no type, but caption and 
shortcaption.</p></div></div>
 <div class="float" id="label-but-no-type-2">
 <p>Second float with no type.
 </p>
-
-
 <div class="caption"><p><strong class="strong">3: </strong>C No type 
2</p></div></div>
 <div class="float" id="warning-in-top">
 <p>A warning
 </p>
-
-
 <div class="caption"><p><strong class="strong">Warning 1: </strong>C A 
warning</p></div></div>
 
 <ul class="mini-toc">
@@ -6857,27 +6812,20 @@ Next: <a href="#Unnumbered" accesskey="n" 
rel="next">Unnumbered</a>, Previous: <
 <div class="float" id="text-in-chapter">
 <p>Text in chapter
 </p>
-
 <div class="caption"><p><strong class="strong">Text 1.1: </strong>C Text in 
chapter</p></div></div>
 <div class="float" id="float-with-a-lot-of-features-and-no-shortcaption">
-
 <div class="caption"><p><strong class="strong">Text 1.2: </strong>An example 
of float caption, no shortcaption<small 
class="enddots">...</small></p></div></div>
 <div class="float" id="theoreme">
 <p>A th&eacute;or&egrave;me
 </p>
-
 <div class="caption"><p><strong class="strong">th&eacute;or&egrave;me 1.1: 
</strong>C A th&eacute;or&egrave;me</p></div></div>
 <div class="float" id="label-but-no-type-in-chapter">
 <p>float with no type.
 </p>
-
-
 <div class="caption"><p><strong class="strong">1.1: </strong>C No type in 
chapter</p></div></div>
 <div class="float" id="warning-in-chapter">
 <p>A warning
 </p>
-
-
 <div class="caption"><p><strong class="strong">Warning 1.1: </strong>C A 
warning in chapter</p></div></div>
 
 <ul class="mini-toc">
@@ -6908,13 +6856,9 @@ Next: <a href="#Chapter-with-unnumbsubsec" accesskey="n" 
rel="next">Chapter with
 
 <div class="float" id="unnumbered-float">
 <p>unnum
-</p>
-
-<div class="caption"><p><strong class="strong">Text 5: </strong>C unnumbered 
float</p></div></div><div class="float" id="label-but-no-type-in-unnumbered">
+</p><div class="caption"><p><strong class="strong">Text 5: </strong>C 
unnumbered float</p></div></div><div class="float" 
id="label-but-no-type-in-unnumbered">
 <p>float with no type.
 </p>
-
-
 <div class="caption"><p><strong class="strong">5: </strong>C No type in 
unnumbered</p></div></div>
 
 <ul class="mini-toc">
@@ -6931,9 +6875,7 @@ Up: <a href="#Unnumbered" accesskey="u" 
rel="up">Unnumbered</a> &nbsp; </p>
 
 <div class="float" id="Section-within-unnumbered-float">
 <p>Section within unnumbered
-</p>
-
-<div class="caption"><p><strong class="strong">Text 6: </strong>C Section 
within unnumbered</p></div></div>
+</p><div class="caption"><p><strong class="strong">Text 6: </strong>C Section 
within unnumbered</p></div></div>
 <hr>
 </div>
 </div>
@@ -6946,9 +6888,7 @@ Next: <a href="#Appendix-for-float" accesskey="n" 
rel="next">Appendix for float<
 
 <div class="float" id="Chapter-with-subsec-float">
 <p>Chap
-</p>
-
-<div class="caption"><p><strong class="strong">Text 2.1: </strong>C Chapter 
with subsec</p></div></div>
+</p><div class="caption"><p><strong class="strong">Text 2.1: </strong>C 
Chapter with subsec</p></div></div>
 <ul class="mini-toc">
 <li><a href="#unnumbered-sec" accesskey="1">unnumbered sec</a></li>
 </ul>
@@ -6962,14 +6902,10 @@ Up: <a href="#Chapter-with-unnumbsubsec" accesskey="u" 
rel="up">Chapter with unn
 
 <div class="float" id="unnumbered-sec-float">
 <p>Chap
-</p>
-
-<div class="caption"><p><strong class="strong">Text 2.2: </strong>C unnumbered 
sec float</p></div></div>
+</p><div class="caption"><p><strong class="strong">Text 2.2: </strong>C 
unnumbered sec float</p></div></div>
 <div class="float" id="label-but-no-type-in-unnumbered-subsec-in-chapter">
 <p>float with no type.
 </p>
-
-
 <div class="caption"><p><strong class="strong">2.1: </strong>C No type in 
unnumbered subsec in chapter</p></div></div>
 <hr>
 </div>
@@ -6984,9 +6920,7 @@ Next: <a href="#list-of-floats" accesskey="n" 
rel="next">list of floats</a>, Pre
 <div class="float" id="appendix-sec-float">
 
 <p>Appendix
-</p>
-
-<div class="caption"><p><strong class="strong">Text A.1: </strong>C appendix 
sec float</p></div></div>
+</p><div class="caption"><p><strong class="strong">Text A.1: </strong>C 
appendix sec float</p></div></div>
 <hr>
 </div>
 <div class="unnumbered-level-extent" id="list-of-floats">
diff --git a/tp/t/results/float/simple.pl b/tp/t/results/float/simple.pl
index e6c878cb1a..246fba10a2 100644
--- a/tp/t/results/float/simple.pl
+++ b/tp/t/results/float/simple.pl
@@ -81,7 +81,8 @@ $result_trees{'simple'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -151,7 +152,6 @@ In float.
 $result_texts{'simple'} = 'Type, Label
 
 In float.
-
 ';
 
 $result_errors{'simple'} = [];
@@ -191,7 +191,6 @@ 
$result_floats{'simple'}{'Type'}[0]{'extra'}{'caption'}{'extra'}{'float'} = $res
 
 $result_converted{'plaintext'}->{'simple'} = 'In float.
 
-
 Type 1: Caption.
 ';
 
@@ -217,8 +216,7 @@ $result_converted{'html'}->{'simple'} = '<!DOCTYPE html>
 <div class="float" id="Label">
 
 <p>In float.
-</p>
-<div class="caption"><p><strong class="strong">Type 1: 
</strong>Caption.</p></div></div>
+</p><div class="caption"><p><strong class="strong">Type 1: 
</strong>Caption.</p></div></div>
 
 
 </body>
diff --git a/tp/t/results/float/special_characters_in_float_type.pl 
b/tp/t/results/float/special_characters_in_float_type.pl
index 359ff1ea60..14624dde44 100644
--- a/tp/t/results/float/special_characters_in_float_type.pl
+++ b/tp/t/results/float/special_characters_in_float_type.pl
@@ -284,7 +284,8 @@ $result_trees{'special_characters_in_float_type'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -467,7 +468,6 @@ $result_texts{'special_characters_in_float_type'} = 'top
 A < " " ` \' \' \\aaa . -- in var, L < " " ` \' \' \\aaa . -- in var
 F
 
-
 ';
 
 $result_sectioning{'special_characters_in_float_type'} = {
@@ -629,7 +629,6 @@ 
$result_converted{'plaintext'}->{'special_characters_in_float_type'} = 'top
 
 F
 
-
 A < " “ ‘ ’ ’ \\aaa . — IN VAR 1.1: float A < " “ ‘ ’ ’ \\aaa .  — IN VAR
 
 * Menu:
@@ -660,7 +659,6 @@ File: ,  Node: chap,  Prev: Top,  Up: Top
 
 F
 
-
 A < " “ ‘ ’ ’ \\aaa . — IN VAR 1.1: float A < " “ ‘ ’ ’ \\aaa .  — IN VAR
 
 * Menu:
@@ -723,8 +721,7 @@ Previous: <a href="#Top" accesskey="p" rel="prev">top</a>, 
Up: <a href="#Top" ac
 
 <div class="float" 
id="L-_003c-_0022-_0060_0060-_0060-_0027-_0027-_005caaa-_002e-_002d_002d_002d-in-var">
 <p>F
-</p>
-<div class="caption"><p><strong class="strong">A &lt; &quot; &ldquo; &lsquo; 
&rsquo; &rsquo; \\aaa . &mdash; <var class="var">in var</var> 1.1: 
</strong>float A &lt; &quot; &ldquo; &lsquo; &rsquo; &rsquo; \\aaa . &mdash; 
<var class="var">in var</var></p></div></div>
+</p><div class="caption"><p><strong class="strong">A &lt; &quot; &ldquo; 
&lsquo; &rsquo; &rsquo; \\aaa . &mdash; <var class="var">in var</var> 1.1: 
</strong>float A &lt; &quot; &ldquo; &lsquo; &rsquo; &rsquo; \\aaa . &mdash; 
<var class="var">in var</var></p></div></div>
 <dl class="listoffloats">
 <dt><a 
href="#L-_003c-_0022-_0060_0060-_0060-_0027-_0027-_005caaa-_002e-_002d_002d_002d-in-var">A
 &lt; &quot; &ldquo; &lsquo; &rsquo; &rsquo; \\aaa . &mdash; <var 
class="var">in var</var> 1.1</a></dt><dd 
class="caption-in-listoffloats"><p>float A &lt; &quot; &ldquo; &lsquo; &rsquo; 
&rsquo; \\aaa . &mdash; <var class="var">in var</var></p></dd>
 </dl>
@@ -812,7 +809,6 @@ 
$result_converted{'latex'}->{'special_characters_in_float_type'} = '\\documentcl
 \\begin{TexinfoFloatAaaainvar}
 F
 \\caption{float A < " `` ` \' \' \\textbackslash{}aaa \\@. --- 
\\Texinfocommandstyletextvar{in var}}
-
 
\\label{anchor:L-_003c-_0022-_0060_0060-_0060-_0027-_0027-_005caaa-_002e-_002d_002d_002d-in-var}%
 \\end{TexinfoFloatAaaainvar}
 
diff --git a/tp/t/results/info_tests/error_in_footnote.pl 
b/tp/t/results/info_tests/error_in_footnote.pl
index 5ce123b7ef..76f987fed7 100644
--- a/tp/t/results/info_tests/error_in_footnote.pl
+++ b/tp/t/results/info_tests/error_in_footnote.pl
@@ -208,7 +208,8 @@ $result_trees{'error_in_footnote'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -400,7 +401,6 @@ Float text1
 
 
 
-
 ';
 
 $result_nodes{'error_in_footnote'} = {
@@ -480,7 +480,6 @@ File: ,  Node: Top,  Up: (dir)
 
 Float text1
 
-
 Text 1: Caption.  TeX.  In caption *note caption*.  Now footnote(1)
 
 * Menu:
@@ -500,7 +499,7 @@ Text 1: Caption.  TeX.  In caption *note caption*.  Now 
footnote(1)
 Tag Table:
 Node: Top27
 Ref: label61
-Ref: Top-Footnote-1344
+Ref: Top-Footnote-1343
 
 End Tag Table
 
diff --git a/tp/t/results/info_tests/float_long_captions.pl 
b/tp/t/results/info_tests/float_long_captions.pl
index 0b6d407fe1..2122f6fba3 100644
--- a/tp/t/results/info_tests/float_long_captions.pl
+++ b/tp/t/results/info_tests/float_long_captions.pl
@@ -86,7 +86,8 @@ $result_trees{'float_long_captions'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -198,7 +199,8 @@ $result_trees{'float_long_captions'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -345,10 +347,8 @@ $result_texis{'float_long_captions'} = '@node Top
 $result_texts{'float_long_captions'} = '
 Text, text1
 
-
 Text, text2
 
-
 ';
 
 $result_nodes{'float_long_captions'} = {
@@ -432,10 +432,8 @@ $result_converted{'info'}->{'float_long_captions'} = 'This 
is , produced from .
 
 File: ,  Node: Top,  Up: (dir)
 
-
 Text 1: AAAAAAAAAAAAAAAA BBBBB CCCCCCCCCCC
 
-
 Text 2: AAAAAAAAAAAAAAAA BBBBBB CCCCCCCCCCC
 
 * Menu:
@@ -448,7 +446,7 @@ Text 2: AAAAAAAAAAAAAAAA BBBBBB CCCCCCCCCCC
 Tag Table:
 Node: Top27
 Ref: text161
-Ref: text2106
+Ref: text2105
 
 End Tag Table
 
diff --git a/tp/t/results/invalid_nestings/float_in_style_command.pl 
b/tp/t/results/invalid_nestings/float_in_style_command.pl
index caea887d83..c68bd28488 100644
--- a/tp/t/results/invalid_nestings/float_in_style_command.pl
+++ b/tp/t/results/invalid_nestings/float_in_style_command.pl
@@ -96,7 +96,8 @@ $result_trees{'float_in_style_command'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -171,7 +172,6 @@ in float
 $result_texts{'float_in_style_command'} = '
 A, B
 in float
-
 ';
 
 $result_errors{'float_in_style_command'} = [
diff --git a/tp/t/results/latex_tests/float_and_refs.pl 
b/tp/t/results/latex_tests/float_and_refs.pl
index b956c3e017..fa453ad149 100644
--- a/tp/t/results/latex_tests/float_and_refs.pl
+++ b/tp/t/results/latex_tests/float_and_refs.pl
@@ -207,7 +207,8 @@ $result_trees{'float_and_refs'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -237,7 +238,8 @@ $result_trees{'float_and_refs'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -357,7 +359,8 @@ $result_trees{'float_and_refs'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -387,7 +390,8 @@ $result_trees{'float_and_refs'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -510,7 +514,8 @@ $result_trees{'float_and_refs'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -540,7 +545,8 @@ $result_trees{'float_and_refs'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -1699,18 +1705,12 @@ $result_texts{'float_and_refs'} = 'top
 no type
 no type
 
-
-
 Thing, with type
 Something with
 
-
-
 Figure, my figure
 In figure
 
-
-
 2 refs
 ******
 
@@ -1996,24 +1996,18 @@ $result_converted{'latex_text'}->{'float_and_refs'} = 
'\\begin{document}
 \\begin{TexinfoFloat}
 no type
 \\caption[short no type float]{no type float}
-
-
 \\label{anchor:no-type}%
 \\end{TexinfoFloat}
 
 \\begin{TexinfoFloatThing}
 Something with
 \\caption[short with type float]{with type float}
-
-
 \\label{anchor:with-type}%
 \\end{TexinfoFloatThing}
 
 \\begin{figure}
 In figure
 \\caption[short caption for figure]{caption for figure}
-
-
 \\label{anchor:my-figure}%
 \\end{figure}
 
diff --git 
a/tp/t/results/latex_tests/float_and_refs/res_latex/float_and_refs.tex 
b/tp/t/results/latex_tests/float_and_refs/res_latex/float_and_refs.tex
index baf4c367d5..8a3ab3efcf 100644
--- a/tp/t/results/latex_tests/float_and_refs/res_latex/float_and_refs.tex
+++ b/tp/t/results/latex_tests/float_and_refs/res_latex/float_and_refs.tex
@@ -55,24 +55,18 @@
 \begin{TexinfoFloat}
 no type
 \caption[short no type float]{no type float}
-
-
 \label{anchor:no-type}%
 \end{TexinfoFloat}
 
 \begin{TexinfoFloatThing}
 Something with
 \caption[short with type float]{with type float}
-
-
 \label{anchor:with-type}%
 \end{TexinfoFloatThing}
 
 \begin{figure}
 In figure
 \caption[short caption for figure]{caption for figure}
-
-
 \label{anchor:my-figure}%
 \end{figure}
 
diff --git a/tp/t/results/paragraph/commands_in_flushright.pl 
b/tp/t/results/paragraph/commands_in_flushright.pl
index 99c6f6c194..c16d784705 100644
--- a/tp/t/results/paragraph/commands_in_flushright.pl
+++ b/tp/t/results/paragraph/commands_in_flushright.pl
@@ -730,7 +730,8 @@ $result_trees{'commands_in_flushright'} = {
                 },
                 {
                   'text' => '
-'
+',
+                  'type' => 'spaces_after_close_brace'
                 },
                 {
                   'args' => [
@@ -1183,7 +1184,6 @@ label, type
 in float
 
 
-
 Sp:
 
 
@@ -1254,7 +1254,6 @@ _table itemx_
 
 in float
 
-
 label 1: in caption
 
                                                                     Sp:
@@ -1306,7 +1305,6 @@ 
$result_converted{'html_text'}->{'commands_in_flushright'} = '<div class="flushr
 
 <p>in float
 </p>
-
 <div class="caption"><p><strong class="strong">label 1: </strong>in 
caption</p></div></div>
 <p class="flushright-paragraph">Sp:
 </p><br>
diff --git a/tp/t/results/preformatted/caption_in_example.pl 
b/tp/t/results/preformatted/caption_in_example.pl
index 4425774b35..cad6d46f10 100644
--- a/tp/t/results/preformatted/caption_in_example.pl
+++ b/tp/t/results/preformatted/caption_in_example.pl
@@ -83,6 +83,10 @@ $result_trees{'caption_in_example'} = {
                     'macro' => ''
                   }
                 },
+                {
+                  'text' => '',
+                  'type' => 'spaces_after_close_brace'
+                },
                 {
                   'contents' => [
                     {
diff --git a/tp/t/results/xml_tests/commands_and_spaces.pl 
b/tp/t/results/xml_tests/commands_and_spaces.pl
index f9a7f84b8c..04469f4e3b 100644
--- a/tp/t/results/xml_tests/commands_and_spaces.pl
+++ b/tp/t/results/xml_tests/commands_and_spaces.pl
@@ -639,10 +639,14 @@ $result_trees{'commands_and_spaces'} = {
                 'macro' => ''
               }
             },
+            {
+              'text' => '  ',
+              'type' => 'spaces_after_close_brace'
+            },
             {
               'contents' => [
                 {
-                  'text' => '  g.
+                  'text' => 'g.
 '
                 }
               ],
@@ -1725,7 +1729,7 @@ Q
 ff, b
 f
 j.
-  g.
+g.
 
 
 
@@ -1885,7 +1889,7 @@ $result_converted{'xml'}->{'commands_and_spaces'} = '<set 
name="foo" line="  foo
 <float name="b" type="ff" number="1" spaces="  " endspaces=" "><floattype 
trailingspaces=" ">ff</floattype><floatname spaces=" ">b   </floatname>
 <para>f
 </para><caption spaces=" "><para>In caption </para></caption><para>j.
-</para><shortcaption><para>Short</para></shortcaption><para>  g.
+</para><shortcaption><para>Short</para></shortcaption>  <para>g.
 </para></float>
 
 <multitable spaces="  " endspaces=" "><columnfractions spaces="  " line="0.4  
0.6  "><columnfraction value="0.4"></columnfraction><columnfraction 
value="0.6"></columnfraction></columnfractions>
diff --git a/tp/t/results/xml_tests/image_inline_or_not.pl 
b/tp/t/results/xml_tests/image_inline_or_not.pl
index 7ed0b3080d..1e043545eb 100644
--- a/tp/t/results/xml_tests/image_inline_or_not.pl
+++ b/tp/t/results/xml_tests/image_inline_or_not.pl
@@ -1327,7 +1327,8 @@ $result_trees{'image_inline_or_not'} = {
             },
             {
               'text' => '
-'
+',
+              'type' => 'spaces_after_close_brace'
             },
             {
               'args' => [
@@ -1520,7 +1521,6 @@ F, g
 
 in_float
 
-
 ';
 
 $result_sectioning{'image_inline_or_not'} = {



reply via email to

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