From 68fd85507d07bae12dfce51b9fe7d83a27d58224 Mon Sep 17 00:00:00 2001 From: Tangent Wantwight Date: Mon, 20 Nov 2023 23:00:10 -0500 Subject: [PATCH] Fold line breaks in HTML template blocks --- src/parser.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/parser.ts b/src/parser.ts index bed45bc..d9dc4d4 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -58,6 +58,9 @@ export const TemplateBlock = Sequence( AtLeast( 0, Choose( + Regex(/\\\n\s*/y) + .map(() => ({ text: " " })) + .expects("BACKSLASH"), BackslashEscape, Bracket, Regex(/[^\\\[]+/y)