Skip to content

Commit

Permalink
[giow] (1) Nuke the comment end space state.
Browse files Browse the repository at this point in the history
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=10578

git-svn-id: http://svn.whatwg.org/webapps@5513 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Sep 26, 2010
1 parent 10e0d89 commit c6e1580
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 190 deletions.
110 changes: 36 additions & 74 deletions complete.html
Expand Up @@ -1162,25 +1162,24 @@ <h2 class="no-num no-toc" id=contents>Table of contents</h2>
<li><a href=#comment-end-dash-state><span class=secno>12.2.4.49 </span>Comment end dash state</a></li>
<li><a href=#comment-end-state><span class=secno>12.2.4.50 </span>Comment end state</a></li>
<li><a href=#comment-end-bang-state><span class=secno>12.2.4.51 </span>Comment end bang state</a></li>
<li><a href=#comment-end-space-state><span class=secno>12.2.4.52 </span>Comment end space state</a></li>
<li><a href=#doctype-state><span class=secno>12.2.4.53 </span>DOCTYPE state</a></li>
<li><a href=#before-doctype-name-state><span class=secno>12.2.4.54 </span>Before DOCTYPE name state</a></li>
<li><a href=#doctype-name-state><span class=secno>12.2.4.55 </span>DOCTYPE name state</a></li>
<li><a href=#after-doctype-name-state><span class=secno>12.2.4.56 </span>After DOCTYPE name state</a></li>
<li><a href=#after-doctype-public-keyword-state><span class=secno>12.2.4.57 </span>After DOCTYPE public keyword state</a></li>
<li><a href=#before-doctype-public-identifier-state><span class=secno>12.2.4.58 </span>Before DOCTYPE public identifier state</a></li>
<li><a href=#doctype-public-identifier-(double-quoted)-state><span class=secno>12.2.4.59 </span>DOCTYPE public identifier (double-quoted) state</a></li>
<li><a href=#doctype-public-identifier-(single-quoted)-state><span class=secno>12.2.4.60 </span>DOCTYPE public identifier (single-quoted) state</a></li>
<li><a href=#after-doctype-public-identifier-state><span class=secno>12.2.4.61 </span>After DOCTYPE public identifier state</a></li>
<li><a href=#between-doctype-public-and-system-identifiers-state><span class=secno>12.2.4.62 </span>Between DOCTYPE public and system identifiers state</a></li>
<li><a href=#after-doctype-system-keyword-state><span class=secno>12.2.4.63 </span>After DOCTYPE system keyword state</a></li>
<li><a href=#before-doctype-system-identifier-state><span class=secno>12.2.4.64 </span>Before DOCTYPE system identifier state</a></li>
<li><a href=#doctype-system-identifier-(double-quoted)-state><span class=secno>12.2.4.65 </span>DOCTYPE system identifier (double-quoted) state</a></li>
<li><a href=#doctype-system-identifier-(single-quoted)-state><span class=secno>12.2.4.66 </span>DOCTYPE system identifier (single-quoted) state</a></li>
<li><a href=#after-doctype-system-identifier-state><span class=secno>12.2.4.67 </span>After DOCTYPE system identifier state</a></li>
<li><a href=#bogus-doctype-state><span class=secno>12.2.4.68 </span>Bogus DOCTYPE state</a></li>
<li><a href=#cdata-section-state><span class=secno>12.2.4.69 </span>CDATA section state</a></li>
<li><a href=#tokenizing-character-references><span class=secno>12.2.4.70 </span>Tokenizing character references</a></ol></li>
<li><a href=#doctype-state><span class=secno>12.2.4.52 </span>DOCTYPE state</a></li>
<li><a href=#before-doctype-name-state><span class=secno>12.2.4.53 </span>Before DOCTYPE name state</a></li>
<li><a href=#doctype-name-state><span class=secno>12.2.4.54 </span>DOCTYPE name state</a></li>
<li><a href=#after-doctype-name-state><span class=secno>12.2.4.55 </span>After DOCTYPE name state</a></li>
<li><a href=#after-doctype-public-keyword-state><span class=secno>12.2.4.56 </span>After DOCTYPE public keyword state</a></li>
<li><a href=#before-doctype-public-identifier-state><span class=secno>12.2.4.57 </span>Before DOCTYPE public identifier state</a></li>
<li><a href=#doctype-public-identifier-(double-quoted)-state><span class=secno>12.2.4.58 </span>DOCTYPE public identifier (double-quoted) state</a></li>
<li><a href=#doctype-public-identifier-(single-quoted)-state><span class=secno>12.2.4.59 </span>DOCTYPE public identifier (single-quoted) state</a></li>
<li><a href=#after-doctype-public-identifier-state><span class=secno>12.2.4.60 </span>After DOCTYPE public identifier state</a></li>
<li><a href=#between-doctype-public-and-system-identifiers-state><span class=secno>12.2.4.61 </span>Between DOCTYPE public and system identifiers state</a></li>
<li><a href=#after-doctype-system-keyword-state><span class=secno>12.2.4.62 </span>After DOCTYPE system keyword state</a></li>
<li><a href=#before-doctype-system-identifier-state><span class=secno>12.2.4.63 </span>Before DOCTYPE system identifier state</a></li>
<li><a href=#doctype-system-identifier-(double-quoted)-state><span class=secno>12.2.4.64 </span>DOCTYPE system identifier (double-quoted) state</a></li>
<li><a href=#doctype-system-identifier-(single-quoted)-state><span class=secno>12.2.4.65 </span>DOCTYPE system identifier (single-quoted) state</a></li>
<li><a href=#after-doctype-system-identifier-state><span class=secno>12.2.4.66 </span>After DOCTYPE system identifier state</a></li>
<li><a href=#bogus-doctype-state><span class=secno>12.2.4.67 </span>Bogus DOCTYPE state</a></li>
<li><a href=#cdata-section-state><span class=secno>12.2.4.68 </span>CDATA section state</a></li>
<li><a href=#tokenizing-character-references><span class=secno>12.2.4.69 </span>Tokenizing character references</a></ol></li>
<li><a href=#tree-construction><span class=secno>12.2.5 </span>Tree construction</a>
<ol>
<li><a href=#creating-and-inserting-elements><span class=secno>12.2.5.1 </span>Creating and inserting elements</a></li>
Expand Down Expand Up @@ -78823,16 +78822,6 @@ <h5 id=comment-start-state><span class=secno>12.2.4.46 </span><dfn>Comment start
<dd>Switch to the <a href=#data-state>data state</a>. Emit the comment
token.</dd>

<dt>U+0009 CHARACTER TABULATION</dt>
<dt>U+000A LINE FEED (LF)</dt>
<dt>U+000C FORM FEED (FF)</dt>
<!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
<dt>U+0020 SPACE</dt>
<dd><a href=#parse-error>Parse error</a>. Append two U+002D HYPHEN-MINUS
characters (-) and the <a href=#current-input-character>current input character</a> to the
comment token's data. Switch to the <a href=#comment-end-space-state>comment end space
state</a>.</dd>

<dt>U+0021 EXCLAMATION MARK (!)</dt>
<dd><a href=#parse-error>Parse error</a>. Switch to the <a href=#comment-end-bang-state>comment end bang
state</a>.</dd>
Expand Down Expand Up @@ -78879,34 +78868,7 @@ <h5 id=comment-start-state><span class=secno>12.2.4.46 </span><dfn>Comment start
character</a> to the comment token's data. Switch to the
<a href=#comment-state>comment state</a>.</dd>

</dl><h5 id=comment-end-space-state><span class=secno>12.2.4.52 </span><dfn>Comment end space state</dfn></h5>

<p>Consume the <a href=#next-input-character>next input character</a>:</p>

<dl class=switch><dt>U+0009 CHARACTER TABULATION</dt>
<dt>U+000A LINE FEED (LF)</dt>
<dt>U+000C FORM FEED (FF)</dt>
<!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
<dt>U+0020 SPACE</dt>
<dd>Append the <a href=#current-input-character>current input character</a> to the comment token's data.</dd>

<dt>U+002D HYPHEN-MINUS (-)</dt>
<dd>Switch to the <a href=#comment-end-dash-state>comment end dash state</a>.</dd>

<dt>U+003E GREATER-THAN SIGN (&gt;)</dt>
<dd>Switch to the <a href=#data-state>data state</a>. Emit the comment
token.</dd>

<dt>EOF</dt>
<dd><a href=#parse-error>Parse error</a>. Emit the comment token. Reconsume
the EOF character in the <a href=#data-state>data state</a>.</dd> <!-- see
comment in comment end state -->

<dt>Anything else</dt>
<dd>Append the <a href=#current-input-character>current input character</a> to the comment token's data. Switch
to the <a href=#comment-state>comment state</a>.</dd>

</dl><h5 id=doctype-state><span class=secno>12.2.4.53 </span><dfn>DOCTYPE state</dfn></h5>
</dl><h5 id=doctype-state><span class=secno>12.2.4.52 </span><dfn>DOCTYPE state</dfn></h5>

<p>Consume the <a href=#next-input-character>next input character</a>:</p>

Expand All @@ -78926,7 +78888,7 @@ <h5 id=comment-start-state><span class=secno>12.2.4.46 </span><dfn>Comment start
<dd><a href=#parse-error>Parse error</a>. Reconsume the character in the
<a href=#before-doctype-name-state>before DOCTYPE name state</a>.</dd>

</dl><h5 id=before-doctype-name-state><span class=secno>12.2.4.54 </span><dfn>Before DOCTYPE name state</dfn></h5>
</dl><h5 id=before-doctype-name-state><span class=secno>12.2.4.53 </span><dfn>Before DOCTYPE name state</dfn></h5>

<p>Consume the <a href=#next-input-character>next input character</a>:</p>

Expand Down Expand Up @@ -78958,7 +78920,7 @@ <h5 id=comment-start-state><span class=secno>12.2.4.46 </span><dfn>Comment start
<a href=#current-input-character>current input character</a>. Switch to the <a href=#doctype-name-state>DOCTYPE name
state</a>.</dd>

</dl><h5 id=doctype-name-state><span class=secno>12.2.4.55 </span><dfn>DOCTYPE name state</dfn></h5>
</dl><h5 id=doctype-name-state><span class=secno>12.2.4.54 </span><dfn>DOCTYPE name state</dfn></h5>

<p>Consume the <a href=#next-input-character>next input character</a>:</p>

Expand Down Expand Up @@ -78987,7 +78949,7 @@ <h5 id=comment-start-state><span class=secno>12.2.4.46 </span><dfn>Comment start
<dd>Append the <a href=#current-input-character>current input character</a> to the current
DOCTYPE token's name.</dd>

</dl><h5 id=after-doctype-name-state><span class=secno>12.2.4.56 </span><dfn>After DOCTYPE name state</dfn></h5>
</dl><h5 id=after-doctype-name-state><span class=secno>12.2.4.55 </span><dfn>After DOCTYPE name state</dfn></h5>

<p>Consume the <a href=#next-input-character>next input character</a>:</p>

Expand Down Expand Up @@ -79027,7 +78989,7 @@ <h5 id=comment-start-state><span class=secno>12.2.4.46 </span><dfn>Comment start

</dd>

</dl><h5 id=after-doctype-public-keyword-state><span class=secno>12.2.4.57 </span><dfn>After DOCTYPE public keyword state</dfn></h5>
</dl><h5 id=after-doctype-public-keyword-state><span class=secno>12.2.4.56 </span><dfn>After DOCTYPE public keyword state</dfn></h5>

<p>Consume the <a href=#next-input-character>next input character</a>:</p>

Expand Down Expand Up @@ -79064,7 +79026,7 @@ <h5 id=comment-start-state><span class=secno>12.2.4.46 </span><dfn>Comment start
<i>force-quirks flag</i> to <i>on</i>. Switch to the <a href=#bogus-doctype-state>bogus
DOCTYPE state</a>.</dd>

</dl><h5 id=before-doctype-public-identifier-state><span class=secno>12.2.4.58 </span><dfn>Before DOCTYPE public identifier state</dfn></h5>
</dl><h5 id=before-doctype-public-identifier-state><span class=secno>12.2.4.57 </span><dfn>Before DOCTYPE public identifier state</dfn></h5>

<p>Consume the <a href=#next-input-character>next input character</a>:</p>

Expand Down Expand Up @@ -79100,7 +79062,7 @@ <h5 id=comment-start-state><span class=secno>12.2.4.46 </span><dfn>Comment start
<i>force-quirks flag</i> to <i>on</i>. Switch to the <a href=#bogus-doctype-state>bogus
DOCTYPE state</a>.</dd>

</dl><h5 id=doctype-public-identifier-(double-quoted)-state><span class=secno>12.2.4.59 </span><dfn>DOCTYPE public identifier (double-quoted) state</dfn></h5>
</dl><h5 id=doctype-public-identifier-(double-quoted)-state><span class=secno>12.2.4.58 </span><dfn>DOCTYPE public identifier (double-quoted) state</dfn></h5>

<p>Consume the <a href=#next-input-character>next input character</a>:</p>

Expand All @@ -79121,7 +79083,7 @@ <h5 id=comment-start-state><span class=secno>12.2.4.46 </span><dfn>Comment start
<dd>Append the <a href=#current-input-character>current input character</a> to the current DOCTYPE
token's public identifier.</dd>

</dl><h5 id=doctype-public-identifier-(single-quoted)-state><span class=secno>12.2.4.60 </span><dfn>DOCTYPE public identifier (single-quoted) state</dfn></h5>
</dl><h5 id=doctype-public-identifier-(single-quoted)-state><span class=secno>12.2.4.59 </span><dfn>DOCTYPE public identifier (single-quoted) state</dfn></h5>

<p>Consume the <a href=#next-input-character>next input character</a>:</p>

Expand All @@ -79142,7 +79104,7 @@ <h5 id=comment-start-state><span class=secno>12.2.4.46 </span><dfn>Comment start
<dd>Append the <a href=#current-input-character>current input character</a> to the current DOCTYPE
token's public identifier.</dd>

</dl><h5 id=after-doctype-public-identifier-state><span class=secno>12.2.4.61 </span><dfn>After DOCTYPE public identifier state</dfn></h5>
</dl><h5 id=after-doctype-public-identifier-state><span class=secno>12.2.4.60 </span><dfn>After DOCTYPE public identifier state</dfn></h5>

<p>Consume the <a href=#next-input-character>next input character</a>:</p>

Expand Down Expand Up @@ -79178,7 +79140,7 @@ <h5 id=comment-start-state><span class=secno>12.2.4.46 </span><dfn>Comment start
<i>force-quirks flag</i> to <i>on</i>. Switch to the <a href=#bogus-doctype-state>bogus
DOCTYPE state</a>.</dd>

</dl><h5 id=between-doctype-public-and-system-identifiers-state><span class=secno>12.2.4.62 </span><dfn>Between DOCTYPE public and system identifiers state</dfn></h5>
</dl><h5 id=between-doctype-public-and-system-identifiers-state><span class=secno>12.2.4.61 </span><dfn>Between DOCTYPE public and system identifiers state</dfn></h5>

<p>Consume the <a href=#next-input-character>next input character</a>:</p>

Expand Down Expand Up @@ -79213,7 +79175,7 @@ <h5 id=comment-start-state><span class=secno>12.2.4.46 </span><dfn>Comment start
<i>force-quirks flag</i> to <i>on</i>. Switch to the <a href=#bogus-doctype-state>bogus
DOCTYPE state</a>.</dd>

</dl><h5 id=after-doctype-system-keyword-state><span class=secno>12.2.4.63 </span><dfn>After DOCTYPE system keyword state</dfn></h5>
</dl><h5 id=after-doctype-system-keyword-state><span class=secno>12.2.4.62 </span><dfn>After DOCTYPE system keyword state</dfn></h5>

<p>Consume the <a href=#next-input-character>next input character</a>:</p>

Expand Down Expand Up @@ -79250,7 +79212,7 @@ <h5 id=comment-start-state><span class=secno>12.2.4.46 </span><dfn>Comment start
<i>force-quirks flag</i> to <i>on</i>. Switch to the <a href=#bogus-doctype-state>bogus
DOCTYPE state</a>.</dd>

</dl><h5 id=before-doctype-system-identifier-state><span class=secno>12.2.4.64 </span><dfn>Before DOCTYPE system identifier state</dfn></h5>
</dl><h5 id=before-doctype-system-identifier-state><span class=secno>12.2.4.63 </span><dfn>Before DOCTYPE system identifier state</dfn></h5>

<p>Consume the <a href=#next-input-character>next input character</a>:</p>

Expand Down Expand Up @@ -79286,7 +79248,7 @@ <h5 id=comment-start-state><span class=secno>12.2.4.46 </span><dfn>Comment start
<i>force-quirks flag</i> to <i>on</i>. Switch to the <a href=#bogus-doctype-state>bogus
DOCTYPE state</a>.</dd>

</dl><h5 id=doctype-system-identifier-(double-quoted)-state><span class=secno>12.2.4.65 </span><dfn>DOCTYPE system identifier (double-quoted) state</dfn></h5>
</dl><h5 id=doctype-system-identifier-(double-quoted)-state><span class=secno>12.2.4.64 </span><dfn>DOCTYPE system identifier (double-quoted) state</dfn></h5>

<p>Consume the <a href=#next-input-character>next input character</a>:</p>

Expand All @@ -79308,7 +79270,7 @@ <h5 id=comment-start-state><span class=secno>12.2.4.46 </span><dfn>Comment start
<dd>Append the <a href=#current-input-character>current input character</a> to the current
DOCTYPE token's system identifier.</dd>

</dl><h5 id=doctype-system-identifier-(single-quoted)-state><span class=secno>12.2.4.66 </span><dfn>DOCTYPE system identifier (single-quoted) state</dfn></h5>
</dl><h5 id=doctype-system-identifier-(single-quoted)-state><span class=secno>12.2.4.65 </span><dfn>DOCTYPE system identifier (single-quoted) state</dfn></h5>

<p>Consume the <a href=#next-input-character>next input character</a>:</p>

Expand All @@ -79330,7 +79292,7 @@ <h5 id=comment-start-state><span class=secno>12.2.4.46 </span><dfn>Comment start
<dd>Append the <a href=#current-input-character>current input character</a> to the current
DOCTYPE token's system identifier.</dd>

</dl><h5 id=after-doctype-system-identifier-state><span class=secno>12.2.4.67 </span><dfn>After DOCTYPE system identifier state</dfn></h5>
</dl><h5 id=after-doctype-system-identifier-state><span class=secno>12.2.4.66 </span><dfn>After DOCTYPE system identifier state</dfn></h5>

<p>Consume the <a href=#next-input-character>next input character</a>:</p>

Expand All @@ -79355,7 +79317,7 @@ <h5 id=comment-start-state><span class=secno>12.2.4.46 </span><dfn>Comment start
state</a>. (This does <em>not</em> set the DOCTYPE token's
<i>force-quirks flag</i> to <i>on</i>.)</dd>

</dl><h5 id=bogus-doctype-state><span class=secno>12.2.4.68 </span><dfn>Bogus DOCTYPE state</dfn></h5>
</dl><h5 id=bogus-doctype-state><span class=secno>12.2.4.67 </span><dfn>Bogus DOCTYPE state</dfn></h5>

<p>Consume the <a href=#next-input-character>next input character</a>:</p>

Expand All @@ -79370,7 +79332,7 @@ <h5 id=comment-start-state><span class=secno>12.2.4.46 </span><dfn>Comment start
<dt>Anything else</dt>
<dd>Ignore the character.</dd>

</dl><h5 id=cdata-section-state><span class=secno>12.2.4.69 </span><dfn>CDATA section state</dfn></h5>
</dl><h5 id=cdata-section-state><span class=secno>12.2.4.68 </span><dfn>CDATA section state</dfn></h5>

<p>Consume every character up to the next occurrence of the three
character sequence U+005D RIGHT SQUARE BRACKET U+005D RIGHT SQUARE
Expand All @@ -79387,7 +79349,7 @@ <h5 id=comment-start-state><span class=secno>12.2.4.46 </span><dfn>Comment start



<h5 id=tokenizing-character-references><span class=secno>12.2.4.70 </span>Tokenizing character references</h5>
<h5 id=tokenizing-character-references><span class=secno>12.2.4.69 </span>Tokenizing character references</h5>

<p>This section defines how to <dfn id=consume-a-character-reference>consume a character
reference</dfn>. This definition is used when parsing character
Expand Down

0 comments on commit c6e1580

Please sign in to comment.