diff --git a/klippy/extras/gcode_macro.py b/klippy/extras/gcode_macro.py index 4f50c75ade02..fe7f57682773 100644 --- a/klippy/extras/gcode_macro.py +++ b/klippy/extras/gcode_macro.py @@ -71,7 +71,8 @@ def run_gcode_from_command(self, context=None): class PrinterGCodeMacro: def __init__(self, config): self.printer = config.get_printer() - self.env = jinja2.Environment('{%', '%}', '{', '}') + self.env = jinja2.Environment( + '{%', '%}', '{', '}', extensions=['jinja2.ext.do']) def load_template(self, config, option, default=None): name = "%s:%s" % (config.get_name(), option) if default is None: