My css file contains this invalid line:
.HistoryPage{}0.75in0.75in0.25in1in
The problem is that the parser ignores the rest of the document. Is it possible to just skip over the broken line?
here's what I see in the stderr:
null [394:12] Error in style rule. (Invalid token ".5". Was expecting one of: <S>, <LBRACE>, ".", ":", "[", <COMMA>, <HASH>, <S>.) null [394:12] Ignoring the following declarations in this rule. null [454:138] Error in declaration. (Invalid token ".". Was expecting one of: <S>, ":".) null [641:15] Error in style sheet. (Invalid token "0.75in0". Was expecting one of: <EOF>, <S>, <IDENT>, "<!--", "-->", ".", ":", "*", "[", <HASH>, <IMPORT_SYM>, <PAGE_SYM>, <MEDIA_SYM>, <ATKEYWORD>.)
Have tried with 0.9.19 maven build
Anonymous
Forgot to mention, the browsers I have tested with so far, including latest Chrome and Firefox, have no problem interpreting the rules following the invalid declaration.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Looks like browsers are restarting after the next closing bracket
This is hopefully fixed. Please try the latest snapshot build.
Thanks for working on this. I have tested the 0.9.20-SNAPSHOT; there is a problem however, the very next valid rule is skipped as well. I am not sure whether intentional or not, it'd be nice to have that fixed as well, if at all possible.
Example:
input:
.red { color: red }
.invalid{}0.75in0.75in0.25in1in
.blue { color: blue }
.green { color: green }
output:
.red { color: red }
.invalid{}0.75in0.75in0.25in1in
.green { color: green }
Thus the .blue class rule is skipped.
Last edit: John Macintosh 2016-07-21
Two reasons for this behaviour
1. Browsers are doing the same (you can check this with the sample i have attached in the previous comment
2. The parser needs to find some point to start with parsing again. And that is not that simple. The restart point is now the next '}'
I understand. I had an idea this might be the case, thanks for confirming.