Fix over-eager parsing of plain values
This commit is contained in:
parent
3c2035e98e
commit
5318a21441
|
@ -202,3 +202,30 @@ a {
|
|||
(block
|
||||
(declaration (property_name) (plain_value))
|
||||
(declaration (property_name) (plain_value)))))
|
||||
|
||||
=======================================
|
||||
Comments right after numbers
|
||||
=======================================
|
||||
|
||||
a {
|
||||
shape-outside: circle(20em/*=*/at 50% 50%);
|
||||
shape-outside: inset(1em, 1em, 1em, 1em);
|
||||
}
|
||||
|
||||
---
|
||||
|
||||
(stylesheet
|
||||
(rule_set
|
||||
(selectors (tag_name))
|
||||
(block
|
||||
(declaration (property_name) (call_expression (function_name) (arguments
|
||||
(integer_value (unit))
|
||||
(comment)
|
||||
(plain_value)
|
||||
(integer_value (unit))
|
||||
(integer_value (unit)))))
|
||||
(declaration (property_name) (call_expression (function_name) (arguments
|
||||
(integer_value (unit))
|
||||
(integer_value (unit))
|
||||
(integer_value (unit))
|
||||
(integer_value (unit))))))))
|
||||
|
|
|
@ -120,7 +120,7 @@ Supports statements
|
|||
(supports_statement
|
||||
(negated_query (selector_query (pseudo_class_selector
|
||||
(class_name)
|
||||
(arguments (plain_value) (plain_value)))))
|
||||
(arguments (tag_name) (tag_name)))))
|
||||
(block)))
|
||||
|
||||
==============================
|
||||
|
|
|
@ -328,7 +328,7 @@ module.exports = grammar({
|
|||
'/'
|
||||
)),
|
||||
|
||||
plain_value: $ => /[-_]*[a-zA-Z][^;()\[\]\s]*/
|
||||
plain_value: $ => /[-_]*[a-zA-Z]([^/,;()\[\]\s]|\/[^\*])*/
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
@ -1607,7 +1607,7 @@
|
|||
},
|
||||
"plain_value": {
|
||||
"type": "PATTERN",
|
||||
"value": "[-_]*[a-zA-Z][^;()\\[\\]\\s]*"
|
||||
"value": "[-_]*[a-zA-Z]([^\\/,;()\\[\\]\\s]|\\/[^\\*])*"
|
||||
}
|
||||
},
|
||||
"extras": [
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue