From 4df6f11f8a354d38f8c0f6f57f622f4ed7d01c3b Mon Sep 17 00:00:00 2001 From: Nicole Parrot Date: Tue, 10 Oct 2017 19:06:40 -0400 Subject: [PATCH] Do not assume an indentation of 2 spaces when writing the global variables at the top of a function declaration. (#1356) --- generators/python/procedures.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/python/procedures.js b/generators/python/procedures.js index 506482d17..20761cd18 100644 --- a/generators/python/procedures.js +++ b/generators/python/procedures.js @@ -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');