From f30e3bce054581409fac1aa448aa27dd3b0068dd Mon Sep 17 00:00:00 2001 From: Daniel Jeffery <1425457+d-jeffery@users.noreply.github.com> Date: Fri, 3 Nov 2023 16:44:16 -0700 Subject: [PATCH] fix: Inject CEL into YAML source (#104) --- package.json | 3 ++- syntaxes/cel.injection.json | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 8a54a5e..458b0bb 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,8 @@ "path": "./syntaxes/cel.injection.json", "scopeName": "cel-openfga.injection", "injectTo": [ - "source.openfga" + "source.openfga", + "source.yaml-store-openfga" ], "embeddedLanguages": { "meta.embedded.inline.cel": "cel" diff --git a/syntaxes/cel.injection.json b/syntaxes/cel.injection.json index ab40ea6..ab6987d 100644 --- a/syntaxes/cel.injection.json +++ b/syntaxes/cel.injection.json @@ -1,6 +1,6 @@ { "scopeName": "cel-openfga.injection", - "injectionSelector": "L:source.openfga", + "injectionSelector": ["L:source.openfga", "L:source.yaml-store-openfga"], "patterns": [ { "include": "#condition" @@ -8,7 +8,7 @@ ], "repository": { "condition": { - "begin": "(^condition)\\s([_a-zA-Z][_a-zA-Z0-9]+)\\((.*)\\)\\s{", + "begin": "(condition)\\s([_a-zA-Z][_a-zA-Z0-9]+)\\((.*)\\)\\s*{", "beginCaptures": { "1": { "name": "keyword.condition.openfga"