GCODE viewer: Support \r, \n and \r\n line endings
So far we only supported \n and \r\n, leading to problems with MM GCODE files generated by Slic3r Prusa Edition which apparently produces \r line endings for some reason. Closes #1996
This commit is contained in:
parent
266cae3509
commit
7e32e5be8f
1 changed files with 1 additions and 1 deletions
|
|
@ -146,7 +146,7 @@ GCODE.gCodeReader = (function(){
|
|||
this.clear();
|
||||
|
||||
var totalSize = reader.target.result.length;
|
||||
lines = reader.target.result.split(/\n/);
|
||||
lines = reader.target.result.split(/[\r\n]+/g);
|
||||
reader.target.result = null;
|
||||
prepareGCode(totalSize);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue