mirror of
https://github.com/google/blockly.git
synced 2026-01-04 15:40:08 +01:00
Line wrap comments in generated code.
This commit is contained in:
@@ -164,6 +164,7 @@ Blockly.Lua.scrub_ = function(block, code) {
|
||||
if (!block.outputConnection || !block.outputConnection.targetConnection) {
|
||||
// Collect comment for this block.
|
||||
var comment = block.getCommentText();
|
||||
comment = Blockly.utils.wrap(comment, this.COMMENT_WRAP - 3);
|
||||
if (comment) {
|
||||
commentCode += Blockly.Lua.prefixLines(comment, '-- ') + '\n';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user