From a3988188f3dd5550e81de2a0e9fab988eebb80b6 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Wed, 31 Jul 2024 07:42:18 -0700 Subject: [PATCH] More flexible placeholder match --- src-web/components/core/Editor/twig/placeholder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-web/components/core/Editor/twig/placeholder.ts b/src-web/components/core/Editor/twig/placeholder.ts index 4c06dfae..27bf3540 100644 --- a/src-web/components/core/Editor/twig/placeholder.ts +++ b/src-web/components/core/Editor/twig/placeholder.ts @@ -36,7 +36,7 @@ class PlaceholderWidget extends WidgetType { export const placeholders = function (variables: { name: string }[]) { const placeholderMatcher = new BetterMatchDecorator({ - regexp: /\$\{\[\s*([^\]\s]+)\s*]}/g, + regexp: /\$\{\[\s*([^\]]+)\s*]}/g, decoration(match, view, matchStartPos) { const matchEndPos = matchStartPos + match[0].length - 1;