diff options
author | bptato <nincsnevem662@gmail.com> | 2024-03-02 13:49:04 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-03-02 13:49:04 +0100 |
commit | ea1043eeb44c3a5ca617e547797023c0cfac63f3 (patch) | |
tree | 9432d895ab8a9d65b97cd1dfbfe63fc8dea87056 /src/css | |
parent | b1d72521e598bcafd446bf3263361e1ae3d6e055 (diff) | |
download | chawan-ea1043eeb44c3a5ca617e547797023c0cfac63f3.tar.gz |
cssparser: fix another anb parsing bug
obviously for ident tokens we must check value, not unit
Diffstat (limited to 'src/css')
-rw-r--r-- | src/css/cssparser.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/css/cssparser.nim b/src/css/cssparser.nim index 7152254f..2463acb2 100644 --- a/src/css/cssparser.nim +++ b/src/css/cssparser.nim @@ -943,9 +943,9 @@ proc parseAnB*(state: var CSSParseState): Option[CSSAnB] = let tok2 = get_tok fail_non_signless_integer tok2, none(CSSAnB) return some((-1, -int(tok2.nvalue))) - elif tok.unit.startsWithNoCase("n-"): + elif tok.value.startsWithNoCase("n-"): return some((1, -parse_sub_int(tok.value, "n-".len))) - elif tok.unit.startsWithNoCase("-n-"): + elif tok.value.startsWithNoCase("-n-"): fail_plus return some((-1, -parse_sub_int(tok.value, "n-".len))) else: |