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: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line), tp/Texinfo/XS/parsetexi/separator.c (handle_open_brace): abort empty line before opening brace in rawpreformatted.
Date: Sun, 05 Mar 2023 12:25:09 -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 a4a3fc436f * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line), 
tp/Texinfo/XS/parsetexi/separator.c (handle_open_brace): abort empty line 
before opening brace in rawpreformatted.
a4a3fc436f is described below

commit a4a3fc436fa925dc0240e0d407901db430d8af05
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Mar 5 18:24:57 2023 +0100

    * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line),
    tp/Texinfo/XS/parsetexi/separator.c (handle_open_brace):
    abort empty line before opening brace in rawpreformatted.
---
 ChangeLog                               | 6 ++++++
 tp/Texinfo/ParserNonXS.pm               | 4 ++--
 tp/Texinfo/XS/parsetexi/separator.c     | 1 +
 tp/t/results/raw/lone_braces_in_html.pl | 4 ----
 4 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1f0792541e..4f5ae11afc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-03-05  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line),
+       tp/Texinfo/XS/parsetexi/separator.c (handle_open_brace):
+       abort empty line before opening brace in rawpreformatted.
+
 2023-03-05  Gavin Smith <gavinsmith0123@gmail.com>
 
        * doc/texinfo.texi (Invoking Macros): Mention possibility of
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 9c1ea175ed..4f78c89bb1 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -6330,8 +6330,8 @@ sub _process_remaining_on_line($$$$)
       # lone braces accepted right in a rawpreformatted
       } elsif ($current->{'type'}
                and $current->{'type'} eq 'rawpreformatted') {
-        # FIXME can this really happen?  check if _abort_empty_line is needed
-        # if yes.
+        # this can happen in an expanded rawpreformatted
+        _abort_empty_line($self, $current);
         push @{$current->{'contents'}}, {'text' => '{',
                                          'parent' => $current };
       # matching braces accepted in a rawpreformatted or math or ignored
diff --git a/tp/Texinfo/XS/parsetexi/separator.c 
b/tp/Texinfo/XS/parsetexi/separator.c
index ad1bf2ab6c..738295dde3 100644
--- a/tp/Texinfo/XS/parsetexi/separator.c
+++ b/tp/Texinfo/XS/parsetexi/separator.c
@@ -188,6 +188,7 @@ handle_open_brace (ELEMENT *current, char **line_inout)
   else if (current->type == ET_rawpreformatted)
     {
       ELEMENT *e = new_element (ET_NONE);
+      abort_empty_line (&current, NULL);
       text_append (&e->text, "{");
       add_to_element_contents (current, e);
     }
diff --git a/tp/t/results/raw/lone_braces_in_html.pl 
b/tp/t/results/raw/lone_braces_in_html.pl
index f844dfda8e..949ec59dcb 100644
--- a/tp/t/results/raw/lone_braces_in_html.pl
+++ b/tp/t/results/raw/lone_braces_in_html.pl
@@ -92,10 +92,6 @@ $result_trees{'lone_braces_in_html'} = {
           'contents' => [
             {
               'contents' => [
-                {
-                  'text' => '',
-                  'type' => 'empty_line'
-                },
                 {
                   'text' => '{
 '



reply via email to

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