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/parser.c (process_remaining_on_line): do not start a paragraph for an unknown @-command.
Date: Sun, 05 Mar 2023 15:55:06 -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 2d001c134d * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line), 
tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line): do not start a 
paragraph for an unknown @-command.
2d001c134d is described below

commit 2d001c134d960734e87ddaf27b2ed1e65a1448ae
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Mar 5 21:54:55 2023 +0100

    * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line),
    tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line): do not
    start a paragraph for an unknown @-command.
---
 ChangeLog                                          |  6 +++++
 tp/Texinfo/ParserNonXS.pm                          |  3 ---
 tp/Texinfo/XS/parsetexi/parser.c                   |  4 ---
 tp/t/results/conditionals/txiinternalvalue.pl      | 10 +++-----
 .../results/converters_tests/at_commands_in_raw.pl | 14 ++++++----
 .../coverage/delcomment_followed_by_cpp_line.pl    | 30 +++++++---------------
 tp/t/results/coverage/unknown_commands.pl          |  9 ++++---
 .../coverage_braces/unknown_command_with_braces.pl |  8 ++++--
 tp/t/results/include/cpp_line_before_first_node.pl | 22 +++++++---------
 tp/t/results/include/cpp_line_latin1.pl            | 10 +++-----
 tp/t/results/indices/unknown_index_entry.pl        |  8 ++++--
 .../indices/unknown_then_known_index_entry.pl      | 10 +++++---
 tp/t/results/latex_tests/pagetype.pl               |  8 ++++--
 tp/t/results/macro/cpp_directives_after_macros.pl  | 20 +++++----------
 tp/t/results/macro/cpp_directives_in_macro.pl      | 30 ++++++++--------------
 .../manual_include_accented_file_name_latin1.info  |  1 -
 .../manual_include_accented_file_name_latin1.info  |  1 -
 17 files changed, 86 insertions(+), 108 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0ddd35e784..0df85ede61 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/parser.c (process_remaining_on_line): do not
+       start a paragraph for an unknown @-command.
+
 2023-03-05  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line),
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index e2ad08194b..9614d59f4a 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -5929,9 +5929,6 @@ sub _process_remaining_on_line($$$$)
     $self->_line_error(sprintf(__("unknown command `%s'"),
                                   $command), $source_info);
     substr($line, 0, $at_command_length) = '';
-    _abort_empty_line($self, $current);
-    my $paragraph = _begin_paragraph($self, $current, $source_info);
-    $current = $paragraph if ($paragraph);
     return ($current, $line, $source_info, $retval);
     # goto funexit;  # used in XS code
   }
diff --git a/tp/Texinfo/XS/parsetexi/parser.c b/tp/Texinfo/XS/parsetexi/parser.c
index cc11cac225..ea37eefc6f 100644
--- a/tp/Texinfo/XS/parsetexi/parser.c
+++ b/tp/Texinfo/XS/parsetexi/parser.c
@@ -1851,10 +1851,6 @@ process_remaining_on_line (ELEMENT **current_inout, char 
**line_inout)
       line_error ("unknown command `%s'", unknown_cmd);
       if (!cmd)
         free (command);
-      abort_empty_line (&current, 0);
-      paragraph = begin_paragraph (current);
-      if (paragraph)
-        current = paragraph;
 
       line = line_after_command;
       goto funexit;
diff --git a/tp/t/results/conditionals/txiinternalvalue.pl 
b/tp/t/results/conditionals/txiinternalvalue.pl
index 425344abaa..afa1de04cc 100644
--- a/tp/t/results/conditionals/txiinternalvalue.pl
+++ b/tp/t/results/conditionals/txiinternalvalue.pl
@@ -10,13 +10,9 @@ $result_trees{'txiinternalvalue'} = {
     {
       'contents' => [
         {
-          'contents' => [
-            {
-              'text' => '
-'
-            }
-          ],
-          'type' => 'paragraph'
+          'text' => '
+',
+          'type' => 'empty_line'
         }
       ],
       'type' => 'before_node_section'
diff --git a/tp/t/results/converters_tests/at_commands_in_raw.pl 
b/tp/t/results/converters_tests/at_commands_in_raw.pl
index 65a64d5b60..f88d4d86e4 100644
--- a/tp/t/results/converters_tests/at_commands_in_raw.pl
+++ b/tp/t/results/converters_tests/at_commands_in_raw.pl
@@ -824,10 +824,14 @@ $result_trees{'at_commands_in_raw'} = {
 ',
           'type' => 'empty_line'
         },
+        {
+          'text' => ' ',
+          'type' => 'spaces_before_paragraph'
+        },
         {
           'contents' => [
             {
-              'text' => ' newidx entry
+              'text' => 'newidx entry
 '
             }
           ],
@@ -1196,7 +1200,7 @@ anchor in html.
 
 anchor in tex.
 
- newidx entry
+newidx entry
 
 
 
@@ -1540,7 +1544,7 @@ $result_converted{'html_text'}->{'at_commands_in_raw'} = 
'<div class="top-level-
 <p>&lsquo;anchor in tex&rsquo;.
 </p><a class="index-entry-id" id="index-fentry2"></a>
 
-<p> newidx entry
+<p>newidx entry
 </p>
 <div class="printindex fn-printindex">
 <table class="fn-entries-printindex" border="0">
@@ -1649,7 +1653,7 @@ Some \\arg\\.
 <para><ref label="anchor-in-tex"><xrefnodename>anchor in 
tex</xrefnodename></ref>.
 </para><findex index="fn" spaces=" "><indexterm index="fn" 
number="1">fentry2</indexterm></findex>
 
-<para> newidx entry
+ <para>newidx entry
 </para>
 <printindex spaces=" " value="cp" line="cp"></printindex>
 <printindex spaces=" " value="fn" line="fn"></printindex>
@@ -1688,7 +1692,7 @@ $result_converted{'docbook'}->{'at_commands_in_raw'} = 
'<chapter label="1" id="c
 <para><link linkend="anchor-in-tex">anchor in tex</link>.
 </para><indexterm role="fn"><primary>fentry2</primary></indexterm>
 
-<para> newidx entry
+<para>newidx entry
 </para>
 <index role="cp"></index>
 <index role="fn"></index>
diff --git a/tp/t/results/coverage/delcomment_followed_by_cpp_line.pl 
b/tp/t/results/coverage/delcomment_followed_by_cpp_line.pl
index 907c21e032..3133c7fd08 100644
--- a/tp/t/results/coverage/delcomment_followed_by_cpp_line.pl
+++ b/tp/t/results/coverage/delcomment_followed_by_cpp_line.pl
@@ -78,13 +78,9 @@ $result_trees{'delcomment_followed_by_cpp_line'} = {
           'type' => 'empty_line'
         },
         {
-          'contents' => [
-            {
-              'text' => '
-'
-            }
-          ],
-          'type' => 'paragraph'
+          'text' => '
+',
+          'type' => 'empty_line'
         },
         {
           'text' => '
@@ -119,13 +115,9 @@ $result_trees{'delcomment_followed_by_cpp_line'} = {
           'type' => 'empty_line'
         },
         {
-          'contents' => [
-            {
-              'text' => '
-'
-            }
-          ],
-          'type' => 'paragraph'
+          'text' => '
+',
+          'type' => 'empty_line'
         },
         {
           'text' => '
@@ -160,13 +152,9 @@ $result_trees{'delcomment_followed_by_cpp_line'} = {
           'type' => 'empty_line'
         },
         {
-          'contents' => [
-            {
-              'text' => '
-'
-            }
-          ],
-          'type' => 'paragraph'
+          'text' => '
+',
+          'type' => 'empty_line'
         },
         {
           'text' => '
diff --git a/tp/t/results/coverage/unknown_commands.pl 
b/tp/t/results/coverage/unknown_commands.pl
index 956346e43a..2883104873 100644
--- a/tp/t/results/coverage/unknown_commands.pl
+++ b/tp/t/results/coverage/unknown_commands.pl
@@ -9,12 +9,13 @@ $result_trees{'unknown_commands'} = {
   'contents' => [
     {
       'contents' => [
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
         {
           'contents' => [
-            {
-              'text' => '
-'
-            },
             {
               'text' => '#
 '
diff --git a/tp/t/results/coverage_braces/unknown_command_with_braces.pl 
b/tp/t/results/coverage_braces/unknown_command_with_braces.pl
index 31b0aa6e45..51a152f313 100644
--- a/tp/t/results/coverage_braces/unknown_command_with_braces.pl
+++ b/tp/t/results/coverage_braces/unknown_command_with_braces.pl
@@ -51,10 +51,14 @@ $result_trees{'unknown_command_with_braces'} = {
 ',
           'type' => 'empty_line'
         },
+        {
+          'text' => ' ',
+          'type' => 'spaces_before_paragraph'
+        },
         {
           'contents' => [
             {
-              'text' => ' first paragraph
+              'text' => 'first paragraph
 '
             }
           ],
@@ -115,7 +119,7 @@ Unknown macro  first paragraph
 
 second paragraph
 
- first paragraph
+first paragraph
 
 second paragraph
 
diff --git a/tp/t/results/include/cpp_line_before_first_node.pl 
b/tp/t/results/include/cpp_line_before_first_node.pl
index 7e1190a0bc..17ac64067c 100644
--- a/tp/t/results/include/cpp_line_before_first_node.pl
+++ b/tp/t/results/include/cpp_line_before_first_node.pl
@@ -30,23 +30,19 @@ $result_trees{'cpp_line_before_first_node'} = {
               'text' => '
 ',
               'type' => 'empty_line'
-            }
-          ],
-          'type' => 'preamble_before_content'
-        },
-        {
-          'contents' => [
+            },
             {
               'text' => '
-'
+',
+              'type' => 'empty_line'
+            },
+            {
+              'text' => '
+',
+              'type' => 'empty_line'
             }
           ],
-          'type' => 'paragraph'
-        },
-        {
-          'text' => '
-',
-          'type' => 'empty_line'
+          'type' => 'preamble_before_content'
         },
         {
           'contents' => [
diff --git a/tp/t/results/include/cpp_line_latin1.pl 
b/tp/t/results/include/cpp_line_latin1.pl
index e3e0a28d06..b131186872 100644
--- a/tp/t/results/include/cpp_line_latin1.pl
+++ b/tp/t/results/include/cpp_line_latin1.pl
@@ -160,13 +160,9 @@ $result_trees{'cpp_line_latin1'} = {
           'type' => 'empty_line'
         },
         {
-          'contents' => [
-            {
-              'text' => '
-'
-            }
-          ],
-          'type' => 'paragraph'
+          'text' => '
+',
+          'type' => 'empty_line'
         },
         {
           'text' => '
diff --git a/tp/t/results/indices/unknown_index_entry.pl 
b/tp/t/results/indices/unknown_index_entry.pl
index 37382472d4..c4cc816584 100644
--- a/tp/t/results/indices/unknown_index_entry.pl
+++ b/tp/t/results/indices/unknown_index_entry.pl
@@ -9,10 +9,14 @@ $result_trees{'unknown_index_entry'} = {
   'contents' => [
     {
       'contents' => [
+        {
+          'text' => ' ',
+          'type' => 'spaces_before_paragraph'
+        },
         {
           'contents' => [
             {
-              'text' => ' someindex entry.
+              'text' => 'someindex entry.
 '
             }
           ],
@@ -29,7 +33,7 @@ $result_texis{'unknown_index_entry'} = ' someindex entry.
 ';
 
 
-$result_texts{'unknown_index_entry'} = ' someindex entry.
+$result_texts{'unknown_index_entry'} = 'someindex entry.
 ';
 
 $result_errors{'unknown_index_entry'} = [
diff --git a/tp/t/results/indices/unknown_then_known_index_entry.pl 
b/tp/t/results/indices/unknown_then_known_index_entry.pl
index a8cd28553f..8fd83f5c5f 100644
--- a/tp/t/results/indices/unknown_then_known_index_entry.pl
+++ b/tp/t/results/indices/unknown_then_known_index_entry.pl
@@ -9,10 +9,14 @@ $result_trees{'unknown_then_known_index_entry'} = {
   'contents' => [
     {
       'contents' => [
+        {
+          'text' => ' ',
+          'type' => 'spaces_before_paragraph'
+        },
         {
           'contents' => [
             {
-              'text' => ' someindex entry.
+              'text' => 'someindex entry.
 '
             },
             {
@@ -96,7 +100,7 @@ $result_trees{'unknown_then_known_index_entry'} = {
   ],
   'type' => 'document_root'
 };
-$result_trees{'unknown_then_known_index_entry'}{'contents'}[0]{'contents'}[1]{'extra'}{'index_entry'}{'entry_element'}
 = 
$result_trees{'unknown_then_known_index_entry'}{'contents'}[0]{'contents'}[1];
+$result_trees{'unknown_then_known_index_entry'}{'contents'}[0]{'contents'}[2]{'extra'}{'index_entry'}{'entry_element'}
 = 
$result_trees{'unknown_then_known_index_entry'}{'contents'}[0]{'contents'}[2];
 
 $result_texis{'unknown_then_known_index_entry'} = ' someindex entry.
 @defindex some
@@ -104,7 +108,7 @@ $result_texis{'unknown_then_known_index_entry'} = ' 
someindex entry.
 ';
 
 
-$result_texts{'unknown_then_known_index_entry'} = ' someindex entry.
+$result_texts{'unknown_then_known_index_entry'} = 'someindex entry.
 ';
 
 $result_errors{'unknown_then_known_index_entry'} = [
diff --git a/tp/t/results/latex_tests/pagetype.pl 
b/tp/t/results/latex_tests/pagetype.pl
index 833c341e99..4bc1bc68d9 100644
--- a/tp/t/results/latex_tests/pagetype.pl
+++ b/tp/t/results/latex_tests/pagetype.pl
@@ -202,10 +202,14 @@ $result_trees{'pagetype'} = {
 ',
           'type' => 'empty_line'
         },
+        {
+          'text' => ' ',
+          'type' => 'spaces_before_paragraph'
+        },
         {
           'contents' => [
             {
-              'text' => ' In smallbook
+              'text' => 'In smallbook
 '
             }
           ],
@@ -355,7 +359,7 @@ section top
 *********
 
 
- In smallbook
+In smallbook
 
 In smallbook
 
diff --git a/tp/t/results/macro/cpp_directives_after_macros.pl 
b/tp/t/results/macro/cpp_directives_after_macros.pl
index bd1b56abd8..5b0ae0b015 100644
--- a/tp/t/results/macro/cpp_directives_after_macros.pl
+++ b/tp/t/results/macro/cpp_directives_after_macros.pl
@@ -196,13 +196,9 @@ $result_trees{'cpp_directives_after_macros'} = {
           'type' => 'empty_line'
         },
         {
-          'contents' => [
-            {
-              'text' => '
-'
-            }
-          ],
-          'type' => 'paragraph'
+          'text' => '
+',
+          'type' => 'empty_line'
         },
         {
           'source_marks' => [
@@ -249,13 +245,9 @@ $result_trees{'cpp_directives_after_macros'} = {
           'type' => 'empty_line'
         },
         {
-          'contents' => [
-            {
-              'text' => '
-'
-            }
-          ],
-          'type' => 'paragraph'
+          'text' => '
+',
+          'type' => 'empty_line'
         }
       ],
       'type' => 'before_node_section'
diff --git a/tp/t/results/macro/cpp_directives_in_macro.pl 
b/tp/t/results/macro/cpp_directives_in_macro.pl
index 9495bab3fd..3b1d0eef5e 100644
--- a/tp/t/results/macro/cpp_directives_in_macro.pl
+++ b/tp/t/results/macro/cpp_directives_in_macro.pl
@@ -138,21 +138,17 @@ $result_trees{'cpp_directives_in_macro'} = {
           'type' => 'empty_line'
         },
         {
-          'contents' => [
+          'source_marks' => [
             {
-              'source_marks' => [
-                {
-                  'counter' => 1,
-                  'position' => 1,
-                  'sourcemark_type' => 'macro_expansion',
-                  'status' => 'end'
-                }
-              ],
-              'text' => '
-'
+              'counter' => 1,
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'end'
             }
           ],
-          'type' => 'paragraph'
+          'text' => '
+',
+          'type' => 'empty_line'
         },
         {
           'text' => '
@@ -165,13 +161,9 @@ $result_trees{'cpp_directives_in_macro'} = {
           'type' => 'empty_line'
         },
         {
-          'contents' => [
-            {
-              'text' => '
-'
-            }
-          ],
-          'type' => 'paragraph'
+          'text' => '
+',
+          'type' => 'empty_line'
         },
         {
           'text' => '
diff --git 
a/tp/tests/encoded/res_parser/manual_include_accented_file_name_latin1/manual_include_accented_file_name_latin1.info
 
b/tp/tests/encoded/res_parser/manual_include_accented_file_name_latin1/manual_include_accented_file_name_latin1.info
index e79ffbb0a0..4f87f45241 100644
--- 
a/tp/tests/encoded/res_parser/manual_include_accented_file_name_latin1/manual_include_accented_file_name_latin1.info
+++ 
b/tp/tests/encoded/res_parser/manual_include_accented_file_name_latin1/manual_include_accented_file_name_latin1.info
@@ -12,7 +12,6 @@ This is a very simple texi manual   <>.
    o� �l �.
 
 
-
 
 Tag Table:
 Node: Top146
diff --git 
a/tp/tests/encoded/res_parser/manual_include_accented_file_name_latin1_explicit_encoding/manual_include_accented_file_name_latin1.info
 
b/tp/tests/encoded/res_parser/manual_include_accented_file_name_latin1_explicit_encoding/manual_include_accented_file_name_latin1.info
index e79ffbb0a0..4f87f45241 100644
--- 
a/tp/tests/encoded/res_parser/manual_include_accented_file_name_latin1_explicit_encoding/manual_include_accented_file_name_latin1.info
+++ 
b/tp/tests/encoded/res_parser/manual_include_accented_file_name_latin1_explicit_encoding/manual_include_accented_file_name_latin1.info
@@ -12,7 +12,6 @@ This is a very simple texi manual   <>.
    o� �l �.
 
 
-
 
 Tag Table:
 Node: Top146



reply via email to

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