fix sending code to sumorobot

This commit is contained in:
Silver Kuusik 2018-08-17 19:51:10 +02:00
parent a80cc89403
commit ec2e6f41ac
1 changed files with 1 additions and 1 deletions

View File

@ -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