From 9f6519a4296092a34c78fe26cad3a98e2196d7f0 Mon Sep 17 00:00:00 2001 From: Alexandre Rousseau Date: Mon, 9 Dec 2024 11:11:41 +0100 Subject: [PATCH] cleanup --- src/ui/src/builder/settings/BuilderTemplateInput.vue | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/ui/src/builder/settings/BuilderTemplateInput.vue b/src/ui/src/builder/settings/BuilderTemplateInput.vue index dba4d3c49..37596b9d7 100644 --- a/src/ui/src/builder/settings/BuilderTemplateInput.vue +++ b/src/ui/src/builder/settings/BuilderTemplateInput.vue @@ -116,18 +116,14 @@ function _get(object: object, path: string[]) { const handleComplete = (selectedText: string) => { let newValue = input.value?.value ?? ""; const { selectionStart, selectionEnd } = input.value?.getSelection() ?? {}; - console.log({ selectionStart, selectionEnd }); const text = newValue.slice(0, selectionStart); const full = getPath(text); if (full === null) return; const keyword = full.at(-1); const regexKeyword = keyword.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "$"; // escape the keyword to handle properly on a regex const replaced = text.replace(new RegExp(regexKeyword), selectedText); - // TODO: fix autocomplete - console.log("handleComplete old", input.value.value); newValue = replaced + newValue.slice(selectionEnd); emit("input", { target: { value: newValue } }); - console.log("handleComplete new", newValue); emit("update:value", newValue); autocompleteOptions.value = []; input.value.focus();