From dca6698007c069c852a06ef43916e31ec36cd18f Mon Sep 17 00:00:00 2001 From: Noel Forte Date: Sat, 30 Nov 2024 23:27:51 -0500 Subject: [PATCH] prepend all multiline error message lines with `>` --- src/environment.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/environment.ts b/src/environment.ts index 4df542e..45b6559 100644 --- a/src/environment.ts +++ b/src/environment.ts @@ -324,7 +324,7 @@ export class Environment { const [line, column, code] = errorLine(source, position); return new Error( - `Error in the template ${path}:${line}:${column}\n\n${code.trim()}\n\n> ${cause.message}\n`, + `Error in the template ${path}:${line}:${column}\n\n${code.trim()}\n\n${cause.message.replaceAll(/^/gm, '> ')}\n`, { cause }, ); }