- From: <bugzilla@jessica.w3.org>
- Date: Sat, 05 Jul 2014 10:55:39 +0000
- To: public-css-bugzilla@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26270 Bug ID: 26270 Summary: produce tokens for "/*" and "*/", or define an unclosed comment as a parse error Product: CSS Version: unspecified Hardware: PC URL: http://drafts.csswg.org/css-syntax/#consume-comments OS: All Status: NEW Severity: normal Priority: P2 Component: Syntax Assignee: jackalmage@gmail.com Reporter: mike@w3.org QA Contact: public-css-bugzilla@w3.org The CSS Syntax spec should either produce tokens for "/*" and "*/", or define an unclosed comment as a parse error. For example, I'd like to have the validator produce a message to the user for a case like the following. sizes="(max-width: 30em) 100vw, /* comment I forgot to close (max-width: 50em) 50vw, calc(33vw - 100px)" But the problem is, using a tokenizer conforming to the CSS Syntax spec (or writing one myself), I have no way at all to expose that comment to the validator -- and so, no way to report it to the user. If a conforming tokenizer produced tokens for "/*" and "*/", I'd be able to expose the lack of a "*/" to the validator and report it to the user. Alternatively, if the "Consume comments" algorithm in the Syntax spec explicitly defined a parse error for the case of an unclosed comment, I wouldn't need the comment tokens -- I could just have the validator code catch that error reported by the tokenizer. To be clear, I'm not suggesting that any UA behavior around this should change. I'm not proposing that an unclosed comment should be fatal and cause parsing to fail. I'm just suggesting it could be a "parse error" in the particular technical sense in which that term is defined in the spec at http://drafts.csswg.org/css-syntax/#parse-error -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Saturday, 5 July 2014 10:55:41 UTC