Skip to content

Commit f803745

Browse files
committed
Fix highlighting for allow without condition
1 parent 0796bb5 commit f803745

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/test/example.rules

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ service cloud.firestore {
1919
allow read: if request.auth.uid == targetUserId
2020
match /subCollection/{carId} {
2121
allow read: if hasValue('bla', request.auth.uid, carId);
22-
allow update: if false; // Some comment
22+
allow update; // Some comment
2323
// another comment
2424
}
2525
}

syntaxes/firestorerules.tmLanguage.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@
198198
},
199199
{
200200
"include": "#allow-body"
201+
},
202+
{
203+
"include": "#comments"
201204
}
202205
]
203206
},
@@ -229,7 +232,7 @@
229232
"allow-head": {
230233
"name": "meta.allow.head.fs",
231234
"begin": "(?<=allow)",
232-
"end": "(?=(\\:))",
235+
"end": "(?=\\:)|(?=\\/\\/)|(?=\\;)|(?=allow)|(?=match)",
233236
"patterns": [
234237
{
235238
"include": "#allow-scope"

0 commit comments

Comments
 (0)