Skip to content

Commit 68c187c

Browse files
authored
(fix) correct syntax highlighting when numbers in attr name
#625
1 parent 2350dfa commit 68c187c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/svelte-vscode/syntaxes/svelte.tmLanguage.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@
705705
},
706706
"tag-generic-attribute": {
707707
"name": "entity.other.attribute-name.html",
708-
"match": "(?<=[^=])\\b([a-zA-Z\\-_:]+)"
708+
"match": "(?<=[^=])\\b([a-zA-Z][a-zA-Z0-9$\\-_:]*)"
709709
},
710710
"tag-id-attribute": {
711711
"name": "meta.attribute-with-value.id.html",
@@ -790,7 +790,7 @@
790790
]
791791
},
792792
"tag-moustaches": {
793-
"begin": "\\b([a-zA-Z\\-_:]+)=(\"|')",
793+
"begin": "\\b([a-zA-Z][a-zA-Z0-9$\\-_:]*)=(\"|')",
794794
"beginCaptures": {
795795
"1": {
796796
"name": "entity.other.attribute-name.html"
@@ -832,7 +832,7 @@
832832
]
833833
},
834834
"tag-moustaches-raw": {
835-
"begin": "\\b([a-zA-Z\\-_:]+)=({)",
835+
"begin": "\\b([a-zA-Z][a-zA-Z0-9$\\-_:]*)=({)",
836836
"beginCaptures": {
837837
"1": {
838838
"name": "entity.other.attribute-name.html"

0 commit comments

Comments
 (0)