Skip to content

Commit

Permalink
🐛 Fix errors including @ commands in macros that weren't this plugin's
Browse files Browse the repository at this point in the history
  • Loading branch information
cp2004 committed Aug 9, 2022
1 parent ad73e2a commit 1d5cc1b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion octoprint_gcode_macro/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ def render_macro(self, command, level=0):
for cmd in commands:
if cmd.startswith("@"):
# Recursively render for each @ command in macro
result += self.render_macro(cmd, level=level + 1)
submacro = self.render_macro(cmd, level=level + 1)
if submacro:
result += submacro
else:
result += [cmd]
else:
Expand Down

0 comments on commit 1d5cc1b

Please sign in to comment.