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

[whatwg] Comment Syntax and Parsing

From: Henri Sivonen <hsivonen@iki.fi>
Date: Mon, 23 Jan 2006 10:38:45 +0200
Message-ID: <9AC0FE67-4709-48D1-AE26-CC118BC05BF9@iki.fi>
On Jan 23, 2006, at 05:23, Ian Hickson wrote:

> Probably the same as XML. Or maybe just "<!--" followed by zero or  
> more
> characters other than U+0000, followed by "-->".

Of those two choices, I prefer the former. I don't like the idea of  
expanding the set of conforming comments, because I think having  
conforming comments should maximize the backwards-compatibility of  
the comments (and there are browsers in the wild that implement SGML- 
style comments, which is incompatible with the latter alternative  

I think allowing paired double hyphens with whitespace in between and  
allowing whitespace between the ending "--" and ">" would make sense.  
This would improve the source-level upgradeability of valid HTML 4 to  
conforming HTML 5. However, it would have the old confusion issues.

<!-- I think this should be conforming. -->
<!-- Making --   -- this conforming would make sense as well. --   >
<!-- IMO, this -- should not be conforming but should parse  
unambiguously with an easy parse error. -->

Henri Sivonen
hsivonen at iki.fi
Received on Monday, 23 January 2006 00:38:45 UTC

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