Skip to content

Commit 7bae545

Browse files
committed
Blockly: ajout d’un comz avec le vrai prefixLines.
1 parent cdd0bc3 commit 7bae545

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

web/blockly_microalg.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ Blockly.MicroAlg.scrub_ = function(block, code) {
156156

157157
// https://groups.google.com/forum/#!searchin/blockly/indentation/blockly/siVJ3OQQpQU/lYf6jqdTERMJ
158158
Blockly.Generator.prototype.prefixLines = function(text, prefix) {
159+
// Original was:
160+
// return prefix + text.replace(/\n(.)/g, '\n' + prefix + '$1');
159161
var splitted = text.split('\n');
160162
if (splitted.length == 1) return prefix + text;
161163
var indented = splitted.map(function (line) {

0 commit comments

Comments
 (0)