Skip to content

Commit c00bfed

Browse files
authored
[Fix] escapeStringForJson in diffusers snippets (#920)
Follow up to #909
1 parent 106398a commit c00bfed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
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 escapeStringForJson = (str: string): string => JSON.stringify(str);
12+
const escapeStringForJson = (str: string): string => JSON.stringify(str).slice(1, -1); // slice is needed to remove surrounding quotes added by JSON.stringify
1313

1414
//#region snippets
1515

0 commit comments

Comments
 (0)