texinfo-commits
[Top][All Lists]
Advanced

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

[8419] parsetexi valid nesting update


From: gavinsmith0123
Subject: [8419] parsetexi valid nesting update
Date: Sat, 27 Oct 2018 05:05:35 -0400 (EDT)

Revision: 8419
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=8419
Author:   gavin
Date:     2018-10-27 05:05:35 -0400 (Sat, 27 Oct 2018)
Log Message:
-----------
parsetexi valid nesting update

Modified Paths:
--------------
    trunk/tp/Texinfo/XS/parsetexi/handle_commands.c
    trunk/tp/Texinfo/XS/parsetexi/parser.c

Modified: trunk/tp/Texinfo/XS/parsetexi/handle_commands.c
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/handle_commands.c     2018-10-27 09:04:38 UTC 
(rev 8418)
+++ trunk/tp/Texinfo/XS/parsetexi/handle_commands.c     2018-10-27 09:05:35 UTC 
(rev 8419)
@@ -105,8 +105,6 @@
       misc = new_element (ET_NONE);
       misc->cmd = cmd;
       add_to_element_contents (current, misc);
-      if (only_in_headings)
-        add_extra_integer (misc, "invalid_nesting", 1);
       register_global_command (misc);
       if (close_preformatted_command(cmd))
         current = begin_preformatted (current);

Modified: trunk/tp/Texinfo/XS/parsetexi/parser.c
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/parser.c      2018-10-27 09:04:38 UTC (rev 
8418)
+++ trunk/tp/Texinfo/XS/parsetexi/parser.c      2018-10-27 09:05:35 UTC (rev 
8419)
@@ -856,7 +856,6 @@
 
   // much TODO here.
 
-  /* 409 "simple text commands" */
   if ((outer_flags & CF_line
             && (command_data(outer).data >= 0
                 || (command_data(outer).data == LINE_line
@@ -863,23 +862,11 @@
                     && !(outer_flags & (CF_def | CF_sectioning)))
                 || command_data(outer).data == LINE_text)
             && outer != CM_center
-            && outer != CM_exdent) // 423
-      || outer == CM_titlefont // 425
-      || outer == CM_anchor
-      || outer == CM_xref
-      || outer == CM_ref
-      || outer == CM_pxref
-      || outer == CM_inforef
+            && outer != CM_exdent)
+      || ((outer_flags & CF_brace)
+           && command_data(outer).data > 0)
       || outer == CM_shortcaption
       || outer == CM_math
-      || outer == CM_indicateurl
-      || outer == CM_email
-      || outer == CM_uref
-      || outer == CM_url
-      || outer == CM_image
-      || outer == CM_abbr
-      || outer == CM_acronym
-      || outer == CM_dmn
       || (outer_flags & CF_index_entry_command) // 563
       || (outer_flags & CF_block // 475
           && !(outer_flags & CF_def)
@@ -908,19 +895,9 @@
       if (cmd == CM_c || cmd == CM_comment)
         ok = 1;
     }
-
-
-  else if (outer == CM_errormsg
-           || outer == CM_sortas)
-    {
-      ok = 0;
-    }
-  // 432 "full text commands"
-  else if ((outer_flags & CF_brace
-             && ((outer_flags & CF_inline)
-                 || command_data(outer).data == BRACE_style))
-
-  // 445 "full line commands"
+  /* "full text commands" */
+  else if ((outer_flags & CF_brace) && command_data(outer).data == BRACE_style
+  /* "full line commands" */
            || outer == CM_center
            || outer == CM_exdent
            || outer == CM_item
@@ -944,8 +921,6 @@
       else if (cmd == CM_c
                || cmd == CM_comment
                || cmd == CM_refill
-               || cmd == CM_noindent
-               || cmd == CM_indent
                || cmd == CM_columnfractions
                || cmd == CM_set
                || cmd == CM_clear
@@ -968,15 +943,6 @@
             ok = 0;
         }
 
-      // 390 exceptions for all of "full line commands",
-      //     "full line commands no refs" and "simple text commands"
-     if (!(outer_flags & CF_brace
-             && (command_data(outer).data == 1)))
-        {
-          if (cmd == CM_indent || cmd == CM_noindent)
-            ok = 0;
-        }
-
       // 396 exceptions for "full line no refs" and "simple text"
       if (outer_flags & (CF_sectioning | CF_def)
           // 4261




reply via email to

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