texinfo-commits
[Top][All Lists]
Advanced

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

[6831] parsetexi update


From: Gavin D. Smith
Subject: [6831] parsetexi update
Date: Thu, 03 Dec 2015 16:27:38 +0000

Revision: 6831
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6831
Author:   gavin
Date:     2015-12-03 16:27:37 +0000 (Thu, 03 Dec 2015)
Log Message:
-----------
parsetexi update

Modified Paths:
--------------
    trunk/parsetexi/convert.c
    trunk/parsetexi/parser.c

Modified: trunk/parsetexi/convert.c
===================================================================
--- trunk/parsetexi/convert.c   2015-12-03 14:53:38 UTC (rev 6830)
+++ trunk/parsetexi/convert.c   2015-12-03 16:27:37 UTC (rev 6831)
@@ -268,6 +268,8 @@
 {
   TEXT result;
 
+  if (!label)
+    return "";
   text_init (&result);
   convert_to_normalized_internal (label, &result, 0);
 

Modified: trunk/parsetexi/parser.c
===================================================================
--- trunk/parsetexi/parser.c    2015-12-03 14:53:38 UTC (rev 6830)
+++ trunk/parsetexi/parser.c    2015-12-03 16:27:37 UTC (rev 6831)
@@ -711,11 +711,14 @@
         }
       else /* 3833 save the line verbatim */
         {
-          if (0 && last_contents_child (current)->type
-              == ET_empty_line_after_command)
+          ELEMENT *last = last_contents_child (current);
+          /* Append to existing element only if the text is all
+             whitespace.  */
+          if (last->type == ET_empty_line_after_command
+              && line[strspn (line, whitespace_chars)] == '\0'
+              && !strchr (last->text.text, '\n'))
             {
-              /* Only if the text is wholly whitespace characters. */
-              text_append (&last_contents_child(current)->text, line);
+              text_append (&last->text, line);
             }
           else
             {




reply via email to

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