-
Notifications
You must be signed in to change notification settings - Fork 759
Description
(migrated from the mailing list)
Ezequiel Rodriguez said:
Context: http://dev.w3.org/csswg/css-syntax/#consume-an-ident-like-token
In the third paragraph, it states:
... If the next input token is U+0022 QUOTATION MARK (") or U+0027 APOSTROPHE ('), reconsume the current input code point, then create a <function-token> with its value set to the returned string and return it.At the point in time the above statement is executed, the current input code point is U+0028 LEFT PARENTHESIS ((). If we reconsume the current input code point, as instructed, the next token in the stream would then be a with the value of U+0028 LEFT PARENTHESIS (().
Is this the desired behavior? It doesn't seem so, as we always consume the U+0028 LEFT PARENTHESIS (() code point if it is seen-- as described in two other places of "Consume an ident-like token."
In conclusion, I believe the "reconsume the current input code point" portion can safely be removed.
Tab Atkins said:
There is a mistake there, but not the one you noticed. ^_^
The reconsume line there is intentional - if there's any whitespace
between the ( and ", I want to eventually emit a whitespace token.
Since the algo consumes all of that, though, I have to reconsume so
that the next call to consumeAToken correctly sees a whitespace
codepoint.The bug is that if there's no whitespace, then I end up reconsuming
the ( code point, which I don't want to do.Good catch, and fixed.