From e23382f72903a2d309cd7e17b21678ded0f711e7 Mon Sep 17 00:00:00 2001 From: Ben Ashton Date: Mon, 5 Sep 2022 22:22:22 -0600 Subject: [PATCH] Fixed bug escaping quotes --- src/template_engine.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/template_engine.mjs b/src/template_engine.mjs index 3e19dc4..4fe5246 100644 --- a/src/template_engine.mjs +++ b/src/template_engine.mjs @@ -77,7 +77,8 @@ export class TemplateEngine { const formatString = isLastLine ? '%s' : '%s\\n'; - buffer += `printf '${formatString}' '${line.replace("'", "'\\''")}';\n`; + buffer += + `printf '${formatString}' '${line.replaceAll("'", "'\\''")}';\n`; } return buffer;