Skip to content

Commit

Permalink
try to fix % handling
Browse files Browse the repository at this point in the history
  • Loading branch information
nraynaud authored Jan 10, 2024
1 parent 79999f1 commit 5c4e828
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webapp/cnc/gcode/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ define(['libs/jsparse', 'cnc/util'], function (jp, util) {
var arrayOfLines = text.split(/\r?\n/);
for (var lineNo = 0; lineNo < arrayOfLines.length; lineNo++) {
var originalLine = arrayOfLines[lineNo];
if (originalLine.match(/[\t ]*%[\t ]*/))
if (originalLine.match(/^[\t ]*%[\t ]*/))
continue;
var line = cleanLineUp(originalLine);
var parsed = machineState.parser.parseLine(line);
Expand All @@ -565,4 +565,4 @@ define(['libs/jsparse', 'cnc/util'], function (jp, util) {
evaluate: evaluate,
createParser: createParser
};
});
});

0 comments on commit 5c4e828

Please sign in to comment.