CSS example: parse decimal form of nums correctly

Before, 0.02 could get parsed as 0 and 0.02 when looking for nums+
This commit is contained in:
Caleb Hearon 2017-02-14 21:01:32 -05:00
parent 205c55d309
commit 770ca6e723

View file

@ -292,7 +292,7 @@ name
= chars:nmchar+ { return chars.join(""); }
num
= [+-]? ([0-9]+ / [0-9]* "." [0-9]+) ("e" [+-]? [0-9]+)? {
= [+-]? ([0-9]* "." [0-9]+ / [0-9]+) ("e" [+-]? [0-9]+)? {
return parseFloat(text());
}