Allow more characters in unquoted property values
This commit is contained in:
parent
a61bc61c74
commit
b2c8e4a547
|
@ -95,3 +95,19 @@ a {
|
|||
(block
|
||||
(declaration (property_name) (string_value))
|
||||
(declaration (property_name) (string_value)))))
|
||||
|
||||
============================
|
||||
URLs
|
||||
============================
|
||||
|
||||
a {
|
||||
b: http://something-else?foo=bar;
|
||||
}
|
||||
|
||||
---
|
||||
|
||||
(stylesheet
|
||||
(rule_set
|
||||
(selectors (tag_name))
|
||||
(block
|
||||
(declaration (property_name) (plain_value)))))
|
||||
|
|
|
@ -67,8 +67,8 @@ a[b] {}
|
|||
|
||||
(stylesheet
|
||||
(rule_set (selectors (attribute_selector (attribute_name))) (block))
|
||||
(rule_set (selectors (attribute_selector (attribute_name) (keyword_value))) (block))
|
||||
(rule_set (selectors (attribute_selector (attribute_name) (keyword_value))) (block))
|
||||
(rule_set (selectors (attribute_selector (attribute_name) (plain_value))) (block))
|
||||
(rule_set (selectors (attribute_selector (attribute_name) (plain_value))) (block))
|
||||
(rule_set (selectors (attribute_selector (tag_name) (attribute_name))) (block)))
|
||||
|
||||
=========================
|
||||
|
|
|
@ -33,11 +33,11 @@ Media statements
|
|||
(binary_query
|
||||
(keyword_query)
|
||||
(feature_query (feature_name) (integer_value (unit))))
|
||||
(feature_query (feature_name) (keyword_value)))
|
||||
(feature_query (feature_name) (plain_value)))
|
||||
(block))
|
||||
(media_statement
|
||||
(feature_query (feature_name) (integer_value (unit)))
|
||||
(binary_query (keyword_query) (feature_query (feature_name) (keyword_value)))
|
||||
(binary_query (keyword_query) (feature_query (feature_name) (plain_value)))
|
||||
(block))
|
||||
(media_statement
|
||||
(binary_query (negated_query (keyword_query)) (parenthesized_query (keyword_query)))
|
||||
|
|
|
@ -180,7 +180,8 @@ module.exports = grammar({
|
|||
// Property Values
|
||||
|
||||
_value: $ => choice(
|
||||
alias($.identifier, $.keyword_value),
|
||||
alias($.identifier, $.plain_value),
|
||||
$.plain_value,
|
||||
$.color_value,
|
||||
$.integer_value,
|
||||
$.float_value,
|
||||
|
@ -238,6 +239,8 @@ module.exports = grammar({
|
|||
|
||||
identifier: $ => /[a-zA-Z-_][a-zA-Z0-9-_]*/,
|
||||
|
||||
plain_value: $ => /[a-zA-Z-_][^;()\[\]\s]*/,
|
||||
|
||||
at_keyword: $ => /@[a-zA-Z-_]+/,
|
||||
|
||||
comment: $ => token(choice(
|
||||
|
|
|
@ -768,7 +768,11 @@
|
|||
"name": "identifier"
|
||||
},
|
||||
"named": true,
|
||||
"value": "keyword_value"
|
||||
"value": "plain_value"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "plain_value"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
|
@ -1134,6 +1138,10 @@
|
|||
"type": "PATTERN",
|
||||
"value": "[a-zA-Z-_][a-zA-Z0-9-_]*"
|
||||
},
|
||||
"plain_value": {
|
||||
"type": "PATTERN",
|
||||
"value": "[a-zA-Z-_][^;()\\[\\]\\s]*"
|
||||
},
|
||||
"at_keyword": {
|
||||
"type": "PATTERN",
|
||||
"value": "@[a-zA-Z-_]+"
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue