Improve params pattern to catch more macros (#1295)
The current pattern can only take into account params followed by default. The proposal catches more parameters and removes white spaces if present.
This commit is contained in:
parent
97b4b544cb
commit
84f7c1acff
@ -80,7 +80,7 @@ class Panel(ScreenPanel):
|
||||
"row": row,
|
||||
"params": {},
|
||||
}
|
||||
pattern = r'params\.(?P<param>..*)\|default\((?P<default>..*)\).*'
|
||||
pattern = r'params\.(?P<param>[A-Z_0-9]+)(?:\s*\|.*\s*default\(\s*(?P<default>[^\)]+)\))?'
|
||||
i = 0
|
||||
for line in gcode:
|
||||
if line.startswith("{") and "params." in line:
|
||||
|
Loading…
x
Reference in New Issue
Block a user