fix sending code to sumorobot
This commit is contained in:
parent
a80cc89403
commit
ec2e6f41ac
@ -175,7 +175,7 @@ window.addEventListener('load', function() {
|
||||
parsedCode = Blockly.Python.workspaceToCode(workspace).replace(/;;.{20}/g, '');
|
||||
}
|
||||
// Escape the qoutes, replace new lines and send the code
|
||||
//sumorobot.send('code', parsedCode.replace(/"/g, '\\"').replace(/\n/g, ';;'));
|
||||
sumorobot.send('code', parsedCode.replace(/"/g, '\\"').replace(/\n/g, ';;'));
|
||||
// Split into lines of code and filter empty lines
|
||||
lines = Blockly.Python.workspaceToCode(workspace).split('\n').filter(Boolean);
|
||||
// Process the code starting from the first line
|
||||
|
Loading…
Reference in New Issue
Block a user