[whatwg] comment parsing

Anne van Kesteren fora at annevankesteren.nl
Sat Jan 21 05:28:21 PST 2006

Quoting Anne van Kesteren <fora at annevankesteren.nl>:
> However, from the specification it is not entirely clear what should 
> happen with <!--></p>.

The specification also does not match what is widely implemented for 
cases like:

# <p><!-- --FAIL></p>

Here is how they are parsed more or less (without EOF and error handling):

zcorpan says:
ok, so it is parsed like this...
<! marked section open state
-- comment open state
anything except --: stay in comment open state
-- comment end state
anything except >: stay in comment end state
 > close comment

Anne van Kesteren

More information about the whatwg mailing list