[html5] r8657 - [cgiowt] (2) Reduce redundant parse errors in some edge cases involving EOFs in [...]

whatwg at whatwg.org whatwg at whatwg.org
Wed Jun 4 20:09:10 PDT 2014


Author: ianh
Date: 2014-06-04 20:09:07 -0700 (Wed, 04 Jun 2014)
New Revision: 8657

Modified:
   complete.html
   index
   source
Log:
[cgiowt] (2) Reduce redundant parse errors in some edge cases involving EOFs in elements in templates.
Affected topics: HTML Syntax and Parsing

Modified: complete.html
===================================================================
--- complete.html	2014-06-05 02:18:12 UTC (rev 8656)
+++ complete.html	2014-06-05 03:09:07 UTC (rev 8657)
@@ -91921,22 +91921,24 @@
    <dt>An end-of-file token</dt>
    <dd>
 
-    <p>If there is a node in the <a href=#stack-of-open-elements>stack of open elements</a> that is not either a
-    <code><a href=#the-dd-element>dd</a></code> element, a <code><a href=#the-dt-element>dt</a></code> element, an <code><a href=#the-li-element>li</a></code> element, a <code><a href=#the-p-element>p</a></code>
-    element, a <code><a href=#the-tbody-element>tbody</a></code> element, a <code><a href=#the-td-element>td</a></code> element, a <code><a href=#the-tfoot-element>tfoot</a></code> element,
-    a <code><a href=#the-th-element>th</a></code> element, a <code><a href=#the-thead-element>thead</a></code> element, a <code><a href=#the-tr-element>tr</a></code> element, the
-    <code><a href=#the-body-element>body</a></code> element, or the <code><a href=#the-html-element>html</a></code> element, then this is a <a href=#parse-error>parse
-    error</a>.</p> <!-- (some of those are fragment cases) -->
-
     <p>If the <a href=#stack-of-template-insertion-modes>stack of template insertion modes</a> is not empty, then process the token
     <a href=#using-the-rules-for>using the rules for</a> the "<a href=#parsing-main-intemplate title="insertion mode: in template">in
     template</a>" <a href=#insertion-mode>insertion mode</a>.</p>
     <!-- this is needed to handle <head><template>...[EOF] - otherwise we don't construct the <body> element -->
 
-    <p>Otherwise, <a href=#stop-parsing>stop parsing</a>.</p>
+    <p>Otherwise, follow these steps:</p>
 
-   </dd>
+    <ol><!--CLEANUP--><li><p>If there is a node in the <a href=#stack-of-open-elements>stack of open elements</a> that is not either a
+     <code><a href=#the-dd-element>dd</a></code> element, a <code><a href=#the-dt-element>dt</a></code> element, an <code><a href=#the-li-element>li</a></code> element, a <code><a href=#the-p-element>p</a></code>
+     element, a <code><a href=#the-tbody-element>tbody</a></code> element, a <code><a href=#the-td-element>td</a></code> element, a <code><a href=#the-tfoot-element>tfoot</a></code> element,
+     a <code><a href=#the-th-element>th</a></code> element, a <code><a href=#the-thead-element>thead</a></code> element, a <code><a href=#the-tr-element>tr</a></code> element, the
+     <code><a href=#the-body-element>body</a></code> element, or the <code><a href=#the-html-element>html</a></code> element, then this is a <a href=#parse-error>parse
+     error</a>.</li> <!-- (some of those are fragment cases) -->
 
+     <li><p><a href=#stop-parsing>Stop parsing</a>.</li>
+
+    </ol></dd>
+
    <dt>An end tag whose tag name is "body"</dt>
    <dd>
 

Modified: index
===================================================================
--- index	2014-06-05 02:18:12 UTC (rev 8656)
+++ index	2014-06-05 03:09:07 UTC (rev 8657)
@@ -91921,22 +91921,24 @@
    <dt>An end-of-file token</dt>
    <dd>
 
-    <p>If there is a node in the <a href=#stack-of-open-elements>stack of open elements</a> that is not either a
-    <code><a href=#the-dd-element>dd</a></code> element, a <code><a href=#the-dt-element>dt</a></code> element, an <code><a href=#the-li-element>li</a></code> element, a <code><a href=#the-p-element>p</a></code>
-    element, a <code><a href=#the-tbody-element>tbody</a></code> element, a <code><a href=#the-td-element>td</a></code> element, a <code><a href=#the-tfoot-element>tfoot</a></code> element,
-    a <code><a href=#the-th-element>th</a></code> element, a <code><a href=#the-thead-element>thead</a></code> element, a <code><a href=#the-tr-element>tr</a></code> element, the
-    <code><a href=#the-body-element>body</a></code> element, or the <code><a href=#the-html-element>html</a></code> element, then this is a <a href=#parse-error>parse
-    error</a>.</p> <!-- (some of those are fragment cases) -->
-
     <p>If the <a href=#stack-of-template-insertion-modes>stack of template insertion modes</a> is not empty, then process the token
     <a href=#using-the-rules-for>using the rules for</a> the "<a href=#parsing-main-intemplate title="insertion mode: in template">in
     template</a>" <a href=#insertion-mode>insertion mode</a>.</p>
     <!-- this is needed to handle <head><template>...[EOF] - otherwise we don't construct the <body> element -->
 
-    <p>Otherwise, <a href=#stop-parsing>stop parsing</a>.</p>
+    <p>Otherwise, follow these steps:</p>
 
-   </dd>
+    <ol><!--CLEANUP--><li><p>If there is a node in the <a href=#stack-of-open-elements>stack of open elements</a> that is not either a
+     <code><a href=#the-dd-element>dd</a></code> element, a <code><a href=#the-dt-element>dt</a></code> element, an <code><a href=#the-li-element>li</a></code> element, a <code><a href=#the-p-element>p</a></code>
+     element, a <code><a href=#the-tbody-element>tbody</a></code> element, a <code><a href=#the-td-element>td</a></code> element, a <code><a href=#the-tfoot-element>tfoot</a></code> element,
+     a <code><a href=#the-th-element>th</a></code> element, a <code><a href=#the-thead-element>thead</a></code> element, a <code><a href=#the-tr-element>tr</a></code> element, the
+     <code><a href=#the-body-element>body</a></code> element, or the <code><a href=#the-html-element>html</a></code> element, then this is a <a href=#parse-error>parse
+     error</a>.</li> <!-- (some of those are fragment cases) -->
 
+     <li><p><a href=#stop-parsing>Stop parsing</a>.</li>
+
+    </ol></dd>
+
    <dt>An end tag whose tag name is "body"</dt>
    <dd>
 

Modified: source
===================================================================
--- source	2014-06-05 02:18:12 UTC (rev 8656)
+++ source	2014-06-05 03:09:07 UTC (rev 8657)
@@ -101416,20 +101416,27 @@
    <dt>An end-of-file token</dt>
    <dd>
 
-    <p>If there is a node in the <span>stack of open elements</span> that is not either a
-    <code>dd</code> element, a <code>dt</code> element, an <code>li</code> element, a <code>p</code>
-    element, a <code>tbody</code> element, a <code>td</code> element, a <code>tfoot</code> element,
-    a <code>th</code> element, a <code>thead</code> element, a <code>tr</code> element, the
-    <code>body</code> element, or the <code>html</code> element, then this is a <span>parse
-    error</span>.</p> <!-- (some of those are fragment cases) -->
-
     <p>If the <span>stack of template insertion modes</span> is not empty, then process the token
     <span>using the rules for</span> the "<span data-x="insertion mode: in template">in
     template</span>" <span>insertion mode</span>.</p>
     <!-- this is needed to handle <head><template>...[EOF] - otherwise we don't construct the <body> element -->
 
-    <p>Otherwise, <span>stop parsing</span>.</p>
+    <p>Otherwise, follow these steps:</p>
 
+    <ol>
+
+<!--CLEANUP-->
+     <li><p>If there is a node in the <span>stack of open elements</span> that is not either a
+     <code>dd</code> element, a <code>dt</code> element, an <code>li</code> element, a <code>p</code>
+     element, a <code>tbody</code> element, a <code>td</code> element, a <code>tfoot</code> element,
+     a <code>th</code> element, a <code>thead</code> element, a <code>tr</code> element, the
+     <code>body</code> element, or the <code>html</code> element, then this is a <span>parse
+     error</span>.</p></li> <!-- (some of those are fragment cases) -->
+
+     <li><p><span>Stop parsing</span>.</p></li>
+
+    </ol>
+
    </dd>
 
    <dt>An end tag whose tag name is "body"</dt>



More information about the Commit-Watchers mailing list