From 8d03ba5bdd63af8d7adb9157b47b70a50beb391a Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Thu, 22 Aug 2024 12:49:42 -0700 Subject: [PATCH] Fix initial apply text --- src-web/components/core/Editor/twig/completion.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src-web/components/core/Editor/twig/completion.ts b/src-web/components/core/Editor/twig/completion.ts index 16cdfab6..6511a846 100644 --- a/src-web/components/core/Editor/twig/completion.ts +++ b/src-web/components/core/Editor/twig/completion.ts @@ -55,10 +55,10 @@ export function twigCompletion({ options }: TwigCompletionConfig) { options: options .filter((v) => v.name.trim()) .map((v) => { - const tagSyntax = openTag + v.label + closeTag; + const inner = v.type === 'function' ? `${v.name}()` : v.name; return { label: v.label, - apply: tagSyntax, + apply: openTag + inner + closeTag, type: v.type === 'variable' ? 'variable' : 'function', matchLen: matchLen, };