Fix conflict between plain values and numbers

This commit is contained in:
Max Brunsfeld 2018-10-29 15:35:40 -07:00
parent 187ef4c709
commit e2a44c9650
2 changed files with 7 additions and 3 deletions

View File

@ -85,6 +85,8 @@ a {
b: 0.5%;
c: 5em;
margin: 10E3px;
margin: -456.8px;
margin: -0.0px;
}
---
@ -93,6 +95,8 @@ a {
(rule_set (selectors (tag_name)) (block
(declaration (property_name) (float_value (unit)))
(declaration (property_name) (integer_value (unit)))
(declaration (property_name) (float_value (unit)))
(declaration (property_name) (float_value (unit)))
(declaration (property_name) (float_value (unit))))))
============================

View File

@ -313,15 +313,15 @@ module.exports = grammar({
identifier: $ => /[a-zA-Z-_][a-zA-Z0-9-_]*/,
plain_value: $ => /[a-zA-Z-_][^;()\[\]\s]*/,
at_keyword: $ => /@[a-zA-Z-_]+/,
comment: $ => token(seq(
'/*',
/[^*]*\*+([^/*][^*]*\*+)*/,
'/'
))
)),
plain_value: $ => /[-_]*[a-zA-Z][^;()\[\]\s]*/
}
})