Bugzilla – Bug 601
Also support dash-dash-space-angle (with any number or type of spaces) in comments.
Last modified: 2009-11-23 17:17:31 CET
Index: source =================================================================== --- source (revision 3194) +++ source (revision 3195) @@ -74751,6 +74751,15 @@ (-) character to the comment token's data. Stay in the <span>comment end state</span>.</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><span>Parse error</span>. Append two U+002D HYPHEN-MINUS (-) + characters and the input character to the comment token's + data. Switch to the <span>comment end space state</span>.</dd> + <dt>U+0021 EXCLAMATION MARK (!)</dt> <dd><span>Parse error</span>. Switch to the <span>comment end bang state</span>.</dd> @@ -74800,6 +74809,40 @@ </dl> + <h5><dfn>Comment end space state</dfn></h5> + + <p>Consume the <span>next input character</span>:</p> + + <dl class="switch"> + + <dt>U+003E GREATER-THAN SIGN (>)</dt> + <dd>Emit the comment token. Switch to the <span>data + state</span>.</dd> + + <dt>U+002D HYPHEN-MINUS (-)</dt> + <dd>Switch to the <span>comment end dash state</span>.</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><span>Parse error</span>. Append the input character to the + comment token's data. Switch to the <span>comment end space + state</span>.</dd> + + <dt>EOF</dt> + <dd><span>Parse error</span>. Emit the comment token. Reconsume + the EOF character in the <span>data state</span>.</dd> <!-- see + comment in comment end state --> + + <dt>Anything else</dt> + <dd>Append the input character to the comment token's data. Switch + to the <span>comment state</span>.</dd> + + </dl> + + <h5><dfn>DOCTYPE state</dfn></h5> <p>Consume the <span>next input character</span>:</p>