Split using RegEx - Cleaner

This commit is contained in:
James Leach 2019-02-12 10:03:36 -06:00
parent c9e8a2b76c
commit f00ea284cb
1 changed files with 4 additions and 2 deletions

View File

@ -62,8 +62,10 @@ $(function() {
}
expanded = self.macro.replace(paramObjRegex, replaceParams)
expanded = "[\"" + expanded + "\"]"
expanded = expanded.replace(/(?:\r\n|\r|\n)/g, "\",\"");
// expanded = "[\"" + expanded + "\"]"
// expanded = expanded.replace(/(?:\r\n|\r|\n)/g, "\",\"");
// Split using RegEx - cleaner
expanded = expanded.split(/\r\n|\r|\n/);
OctoPrint.control.sendGcode(expanded);
}