tdewolff / parse

Go parsers for web formats

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CSS parser ignoring comments within rulesets

lucasgrinspan opened this issue · comments

Hello there, I've noticed some interesting behavior with the CSS parser. It doesn't seem to return comment grammar for comments in rulesets. It works fine for comments defined outside of rulesets however. As an example:

/* test */ 
h1 {
    color: red; 
    /* test */ 
}

Iterating over the above stylesheet leads to only one Comment instead of the expected two. Is this a bug in the parser?
Reproduction Link