Skip to content

Commit b7269c5

Browse files
committed
rn to escapeStringForJson
1 parent 04a8669 commit b7269c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/tasks/src/model-libraries-snippets.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function nameWithoutNamespace(modelId: string): string {
99
return splitted.length === 1 ? splitted[0] : splitted[1];
1010
}
1111

12-
const escapeQuotes = (str: string): string => JSON.stringify(str);
12+
const escapeStringForJson = (str: string): string => JSON.stringify(str);
1313

1414
//#region snippets
1515

@@ -76,7 +76,7 @@ function get_base_diffusers_model(model: ModelData): string {
7676
function get_prompt_from_diffusers_model(model: ModelData): string | undefined {
7777
const prompt = (model.widgetData?.[0] as WidgetExampleTextInput).text ?? model.cardData?.instance_prompt;
7878
if (prompt) {
79-
return escapeQuotes(prompt);
79+
return escapeStringForJson(prompt);
8080
}
8181
}
8282

0 commit comments

Comments
 (0)