From 5a278e34dd5f602af35a1029e772289cf422d44e Mon Sep 17 00:00:00 2001 From: HellAholic Date: Mon, 29 Jun 2026 14:26:12 +0200 Subject: [PATCH 1/2] Fix quoted extruder capture in template regex Updated the G-code template resolver regex so the optional `extruder_nr` group no longer matches single or double quotes. This tightens placeholder parsing and prevents invalid quoted values from being treated as extruder identifiers. This allows for comparisons such as if "value in list" which currently results in the last list item being associated as extruder_nr --- src/gcode_export/GcodeTemplateResolver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gcode_export/GcodeTemplateResolver.cpp b/src/gcode_export/GcodeTemplateResolver.cpp index f3406196fc..2e0ebe9183 100644 --- a/src/gcode_export/GcodeTemplateResolver.cpp +++ b/src/gcode_export/GcodeTemplateResolver.cpp @@ -245,7 +245,7 @@ std::string GcodeTemplateResolver::resolveGCodeTemplate( std::string output; GcodeConditionState condition_state = GcodeConditionState::OutsideCondition; - static const boost::regex expression_regex(R"({\s*(?if|else|elif|endif)?\s*(?[^{}]*?)\s*(?:,\s*(?[^{},]*))?\s*}(?\n?))"); + static const boost::regex expression_regex(R"({\s*(?if|else|elif|endif)?\s*(?[^{}]*?)\s*(?:,\s*(?[^{},'"]+))?\s*}(?\n?))"); // Create local environment containing the context-specific extra settings, and are chained to the extruder and global environment std::map, std::shared_ptr> local_environments; From d45dcfc8a659d715ed7b058be8627bb66d7e2f02 Mon Sep 17 00:00:00 2001 From: HellAholic Date: Fri, 3 Jul 2026 10:25:53 +0200 Subject: [PATCH 2/2] bump dependency version The 1.2.1 package provides "str" in "str" check. see: https://github.com/Ultimaker/CuraFormulaeEngine/pull/6 --- conandata.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conandata.yml b/conandata.yml index b093735b32..c4d6f0338b 100644 --- a/conandata.yml +++ b/conandata.yml @@ -1,7 +1,7 @@ version: "5.14.0-alpha.0" commit: "unknown" requirements: - - "cura-formulae-engine/1.2.0@ultimaker/testing" + - "cura-formulae-engine/1.2.1@ultimaker/testing" - "scripta/[>=1.1.0]@ultimaker/testing" - "libpng/1.6.48" - "onetbb/2022.3.0"