grammar: add text-transform attribute

Closes #11
This commit is contained in:
Dmitriy Pleshevskiy 2023-06-14 18:17:22 +03:00
parent d1ace018ae
commit 9a1ec96632
Signed by: pleshevskiy
GPG key ID: 79C4487B44403985
5 changed files with 14 additions and 1 deletions

View file

@ -265,7 +265,8 @@ module.exports = grammar({
"link", "link",
"italic", "italic",
"bold", "bold",
"underline" "underline",
"text-transform"
), ),
_text_attr_key: ($) => "near", _text_attr_key: ($) => "near",

View file

@ -1086,6 +1086,10 @@
{ {
"type": "STRING", "type": "STRING",
"value": "underline" "value": "underline"
},
{
"type": "STRING",
"value": "text-transform"
} }
] ]
}, },

View file

@ -520,6 +520,10 @@
"type": "target-arrowhead", "type": "target-arrowhead",
"named": false "named": false
}, },
{
"type": "text-transform",
"named": false
},
{ {
"type": "tooltip", "type": "tooltip",
"named": false "named": false

Binary file not shown.

View file

@ -57,6 +57,7 @@ foo.style.shadow: false
foo.style.multiple: true foo.style.multiple: true
foo.style.animated: true foo.style.animated: true
foo.style.link: https://to foo.style.link: https://to
foo.style.text-transform: uppercase
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
@ -72,6 +73,7 @@ foo.style.link: https://to
(shape (shape_key) (dot) (attribute (attr_key) (dot) (attribute (attr_key) (attr_value (boolean))))) (shape (shape_key) (dot) (attribute (attr_key) (dot) (attribute (attr_key) (attr_value (boolean)))))
(shape (shape_key) (dot) (attribute (attr_key) (dot) (attribute (attr_key) (attr_value (boolean))))) (shape (shape_key) (dot) (attribute (attr_key) (dot) (attribute (attr_key) (attr_value (boolean)))))
(shape (shape_key) (dot) (attribute (attr_key) (dot) (attribute (attr_key) (attr_value)))) (shape (shape_key) (dot) (attribute (attr_key) (dot) (attribute (attr_key) (attr_value))))
(shape (shape_key) (dot) (attribute (attr_key) (dot) (attribute (attr_key) (attr_value))))
) )
================================================================================ ================================================================================
@ -89,6 +91,7 @@ foo.style: {
multiple: true multiple: true
animated: true animated: true
link: https://to link: https://to
text-transform: uppercase
} }
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
@ -110,6 +113,7 @@ foo.style: {
(attribute (attr_key) (attr_value (boolean))) (attribute (attr_key) (attr_value (boolean)))
(attribute (attr_key) (attr_value (boolean))) (attribute (attr_key) (attr_value (boolean)))
(attribute (attr_key) (attr_value)) (attribute (attr_key) (attr_value))
(attribute (attr_key) (attr_value))
) )
) )
) )