app/assets/htmls/gs-element-blockly.html in gobstones-blockly-0.28.0 vs app/assets/htmls/gs-element-blockly.html in gobstones-blockly-0.28.1
- old
+ new
@@ -5687,10 +5687,10 @@
return [code, Blockly.GobstonesLanguage.ORDER_ATOMIC];
};
Blockly.GobstonesLanguage.ForEach = function (block) {
let body = Blockly.GobstonesLanguage.statementToCode(block, 'block');
- var varName = block.getFieldValue('varName');
+ var varName = formatCallName(block.getFieldValue('varName'), false, Blockly.VARIABLE_CATEGORY_NAME);
var list = Blockly.GobstonesLanguage.valueToCode(block, 'list', Blockly.GobstonesLanguage.ORDER_NONE) || '';
return `foreach ${varName} in ${list} {\n${body}}\n`;
};
\ No newline at end of file