From d230a52d4261d12225141638a31135517dde8ba8 Mon Sep 17 00:00:00 2001 From: sergiopaniego Date: Tue, 19 Nov 2024 18:06:21 +0100 Subject: [PATCH] Updated replace to replaceAll ocurrences in url patterns --- scripts/api-inference/scripts/generate.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/api-inference/scripts/generate.ts b/scripts/api-inference/scripts/generate.ts index c6e48a58e..cae879700 100644 --- a/scripts/api-inference/scripts/generate.ts +++ b/scripts/api-inference/scripts/generate.ts @@ -440,8 +440,8 @@ TASKS.forEach((task) => { }; DATA.snippets[task] = SNIPPETS_TEMPLATE({ taskSnippets, - taskSnakeCase: task.replace("-", "_"), - taskAttached: task.replace("-", ""), + taskSnakeCase: task.replaceAll("-", "_"), + taskAttached: task.replaceAll("-", ""), }); }); @@ -511,8 +511,8 @@ function fetchChatCompletion() { }; DATA.snippets[task.name] = SNIPPETS_TEMPLATE({ taskSnippets, - taskSnakeCase: baseName.replace("-", "_"), - taskAttached: baseName.replace("-", ""), + taskSnakeCase: baseName.replaceAll("-", "_"), + taskAttached: baseName.replaceAll("-", ""), }); });