Move utilities into own directory.

TODO: There are more functions which may be migrated into dom and string.
This commit is contained in:
Neil Fraser
2019-06-06 17:30:34 -07:00
committed by Neil Fraser
parent cf91b82bb0
commit d1a29739d8
67 changed files with 1168 additions and 946 deletions

View File

@@ -27,6 +27,7 @@
goog.provide('Blockly.Python');
goog.require('Blockly.Generator');
goog.require('Blockly.utils.string');
/**
@@ -254,7 +255,8 @@ Blockly.Python.scrub_ = function(block, code, opt_thisOnly) {
if (!block.outputConnection || !block.outputConnection.targetConnection) {
// Collect comment for this block.
var comment = block.getCommentText();
comment = Blockly.utils.wrap(comment, Blockly.Python.COMMENT_WRAP - 3);
comment = Blockly.utils.string.wrap(comment,
Blockly.Python.COMMENT_WRAP - 3);
if (comment) {
if (block.getProcedureDef) {
// Use a comment block for function comments.