From dae2111d9032fe7df4085393e388bcae46e947d1 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Sat, 3 Feb 2024 15:53:17 +0100 Subject: [PATCH] #each parser fix --- common/template/template_parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/template/template_parser.ts b/common/template/template_parser.ts index 89d6e90e..ab2d3479 100644 --- a/common/template/template_parser.ts +++ b/common/template/template_parser.ts @@ -76,7 +76,7 @@ function processTree(tree: AST): AST { switch (blockType) { case "each": { const eachExpr = blockTextContent.trim(); - const eachVarMatch = eachExpr.match(/@(\w+)\s*in\s*(.+)$/s); + const eachVarMatch = eachExpr.match(/^@(\w+)\s*in\s*(.+)$/s); if (!eachVarMatch) { // Not a each var declaration, just an expression const expressionTree = parseTreeToAST(parse(