Browse Source

CSS example: parse decimal form of nums correctly

Before, 0.02 could get parsed as 0 and 0.02 when looking for nums+
master
Caleb Hearon 4 years ago
parent
commit
770ca6e723
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      examples/css.pegjs

+ 1
- 1
examples/css.pegjs 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());
}


Loading…
Cancel
Save