Skip to content

Commit

Permalink
Merge pull request #1338 from bdring/dymk/skip-leading-whitespace
Browse files Browse the repository at this point in the history
Skip leading whitespace when processing dollar commands
  • Loading branch information
dymk authored Sep 27, 2024
2 parents daf0c8a + 6c44e21 commit c04d38b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions FluidNC/src/ProcessSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,10 @@ Error execute_line(char* line, Channel& channel, AuthenticationLevel auth_level)
if (line[0] == 0) {
return Error::Ok;
}
// Skip leading whitespace
while (isspace(*line)) {
++line;
}
// User '$' or WebUI '[ESPxxx]' command
if (line[0] == '$' || line[0] == '[') {
if (gc_state.skip_blocks) {
Expand Down
4 changes: 4 additions & 0 deletions fixture_tests/fixtures/dollar_command_leading_whitespace.nc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-> $X
<- ok
-> $X
<- ok

0 comments on commit c04d38b

Please sign in to comment.