Improved handling of new lines

This commit is contained in:
Ben Ashton 2022-09-05 19:31:12 -06:00
parent c00c2a4af3
commit 954919c393

View File

@ -49,7 +49,7 @@ export class TemplateEngine {
}
_renderInline(value) {
return `printf '%s' "${value}" | jq -Rr @html;\n`;
return `printf '%s' "${value}" | jq -Rr @html | head -c -1;\n`;
}
_renderInlineUnescaped(value) {
@ -57,7 +57,7 @@ export class TemplateEngine {
}
_renderInlineStatement(value) {
return `printf '%s' "$(${value})" | jq -Rr @html;\n`;
return `printf '%s' "$(${value})" | jq -Rr @html | head -c -1;\n`;
}
_renderInlineStatementUnescaped(value) {