-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CURA-12386 G-Code replacement fails with single line code #20318
base: 5.10
Are you sure you want to change the base?
CURA-12386 G-Code replacement fails with single line code #20318
Conversation
CURA-12386 The regex was not specific enough and would catch the rest of the line, now we force stopping as soon as we see a { or }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
- Unit-tests! Yes! 🎈
- I briefly thought about
[^}]
instead of[^{}]
, but that wouldn't allow us to nest either (future features ...) and this does indeed make just as much sense (it's just wether you have a malformed bracket inside the replacement versus one outside -- but in the end it's the same syntax error).
Interestingly, it produces |
Yeah, the idea is just to have this working as best as possible within the current limitations, until we replace it by something more powerful (Jinja !!!) |
The regex was not specific enough and would catch the rest of the line, now we force stopping as soon as we see a
{
or}
CURA-12386
Fixes 20183