From 243f0d7df00e2c8dbd4a3c05f60ed009328cebda Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Wed, 27 Oct 2021 22:55:01 +0200 Subject: [PATCH] fix: update getMacroParams regex Signed-off-by: Stefan Dej --- src/plugins/helpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/helpers.ts b/src/plugins/helpers.ts index 586ba157..6cbedafc 100644 --- a/src/plugins/helpers.ts +++ b/src/plugins/helpers.ts @@ -169,7 +169,7 @@ export function formatTime(date: Date): string { } export function getMacroParams(macro: { gcode: string }): PrinterStateMacroParams { - const paramRegex = /{%?.*?params\.([A-Za-z_0-9]+)(?:\|(int|string|double))?(?:\|default\('?(.*?)'?\))?(?:\|(int|string))?.*?%?}/ + const paramRegex = /{%?.*?\sparams\.([A-Za-z_0-9]+)(?:\|(int|string|double))?(?:\|default\('?(.*?)'?\))?(?:\|(int|string))?.*?%?}/ let params = paramRegex.exec(macro.gcode) let currentMatch = macro.gcode