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

[whatwg] comment parsing

From: Anne van Kesteren <fora@annevankesteren.nl>
Date: Sat, 21 Jan 2006 14:17:16 +0100
Message-ID: <20060121141716.e6y3838tnpy0w80k@webmail.annevankesteren.nl>
Given the new parsing rules for comments (all those internal discussions...) I
was trying to write some testcases for how they are defined now.

# <p><!-- -- -->PASS<!--></p>

However, from the specification it is not entirely clear what should happen with
<!--></p>. Well, perhaps it is, but then I'd like that to be changed. If we take
the problematic snippet:

# <!--></p>

It seems that per <http://whatwg.org/specs/web-apps/current-work/#marked> "<!--"
starts the comment. It seems that per
<http://whatwg.org/specs/web-apps/current-work/#comment> all characters that
follow and are not a dash have to become part of the comment. Is that correct?

So if I would modify the testcase to say:

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

And directly after "FAIL" it is EOF (or a few end tags later) it would never
show up, right?

Given that most browsers show "FAIL" or "<!-->FAIL" for:

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

A change might be in order. Or perhaps someone explaining to me what I did wrong
when reading the specification.

Anne van Kesteren
Received on Saturday, 21 January 2006 05:17:16 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:44 UTC