Skip to content

Commit

Permalink
Fixed block mapping in "count_for" arguments for python.
Browse files Browse the repository at this point in the history
  • Loading branch information
brianpmarks committed Oct 18, 2021
1 parent 2798051 commit 8583820
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
5 changes: 5 additions & 0 deletions generators/python/loops.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ Blockly.Python['controls_for'] = function(block) {
branch = Blockly.Python.addLoopTrap(branch, block.id) ||
Blockly.Python.PASS;

// remove ids added by mapBlocks_
argument0 = argument0.replace(/\/\*\* \S+ \*\*\//g, '').replace(/\/\*\* end \S+ \*\*\//g, '');
argument1 = argument1.replace(/\/\*\* \S+ \*\*\//g, '').replace(/\/\*\* end \S+ \*\*\//g, '');
increment = increment.replace(/\/\*\* \S+ \*\*\//g, '').replace(/\/\*\* end \S+ \*\*\//g, '');

var code = '';
var range;

Expand Down
13 changes: 7 additions & 6 deletions python_compressed.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8583820

Please sign in to comment.