mirror of
https://github.com/google/blockly.git
synced 2026-01-04 15:40:08 +01:00
Do not assume an indentation of 2 spaces when writing the global variables at the top of a function declaration. (#1356)
This commit is contained in:
committed by
Rachel Fenichel
parent
fb774c9b67
commit
4df6f11f8a
@@ -44,7 +44,7 @@ Blockly.Python['procedures_defreturn'] = function(block) {
|
||||
Blockly.Variables.NAME_TYPE));
|
||||
}
|
||||
}
|
||||
globals = globals.length ? ' global ' + globals.join(', ') + '\n' : '';
|
||||
globals = globals.length ? Blockly.Python.INDENT + 'global ' + globals.join(', ') + '\n' : '';
|
||||
var funcName = Blockly.Python.variableDB_.getName(block.getFieldValue('NAME'),
|
||||
Blockly.Procedures.NAME_TYPE);
|
||||
var branch = Blockly.Python.statementToCode(block, 'STACK');
|
||||
|
||||
Reference in New Issue
Block a user