diff options
author | bptato <nincsnevem662@gmail.com> | 2023-01-20 13:33:34 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-01-20 13:33:34 +0100 |
commit | 8d83bfc2c16ee2e789a7dadaff26d6e7cb6047af (patch) | |
tree | 65cda1512e12641b7a3a62706dcbdf532425935f /src/css | |
parent | aa5c5f18257a7fdf42eaa7e63ea18f93a6a4ee8c (diff) | |
download | chawan-8d83bfc2c16ee2e789a7dadaff26d6e7cb6047af.tar.gz |
selectorparser: parse comma correctly in combinators
Diffstat (limited to 'src/css')
-rw-r--r-- | src/css/selectorparser.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/css/selectorparser.nim b/src/css/selectorparser.nim index 6a07c277..2a79ecb2 100644 --- a/src/css/selectorparser.nim +++ b/src/css/selectorparser.nim @@ -318,6 +318,9 @@ proc parseSelectorToken(state: var SelectorParser, csstoken: CSSToken) = of CSS_HASH_TOKEN: state.addSelector(Selector(t: ID_SELECTOR, id: csstoken.value)) of CSS_COMMA_TOKEN: + if state.combinator != nil: + state.selectors[^1].add(state.combinator) + state.combinator = nil if state.selectors[^1].len > 0: state.addComplexSelector() of CSS_WHITESPACE_TOKEN: |