Fix: use String.raw for escaped triple quotes in TOML

This commit is contained in:
Brian Madison
2026-01-24 12:15:57 -06:00
parent 5aef6379b9
commit b102694c64

View File

@@ -38,7 +38,7 @@ Follow all instructions in the ${type} file exactly as written.
if (format === 'toml') { if (format === 'toml') {
// Escape any triple quotes in content // Escape any triple quotes in content
const escapedContent = content.replace(/"""/g, '\\"\\"\\"'); const escapedContent = content.replaceAll('"""', String.raw`\"\"\"`);
return `description = "${description}" return `description = "${description}"
prompt = """ prompt = """
${escapedContent} ${escapedContent}