W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2006

[whatwg] Parse error for "--" in comment end state?

From: Henri Sivonen <hsivonen@iki.fi>
Date: Tue, 9 May 2006 21:53:10 +0300
Message-ID: <C846ADFF-6443-455E-B700-BDC18A7595C3@iki.fi>

On May 9, 2006, at 20:05, Simon Pieters wrote:

>> Anything else
>>    Append two U+002D HYPHEN-MINUS (-) characters and the input  
>> character
>>    to the comment token's data. Switch to the comment state.
>
> ...to say:
>
>   Anything else
>       Parse error. Append two U+002D HYPHEN-MINUS (-) characters  
> and the input
>       character to the comment token's data. Switch to the comment  
> state.

+1

This has two benefits:
  1) Previously non-conforming syntax won't be made conforming, so  
pedantic HTML 4 implementations won't break with conforming HTML5  
comments.
  2) Conforming HTML5 documents can be serialized as conforming  
XHTML5 document without data loss even when preserving comments.  
(Strictly speaking in XML processing it is legitimate to drop  
comments in the bit bucket, so in that sense, dropping comments would  
not be *significant* data loss. :-)

-- 
Henri Sivonen
hsivonen at iki.fi
http://hsivonen.iki.fi/
Received on Tuesday, 9 May 2006 11:53:10 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:27 UTC