From 642bb5f27c12ca776c9b29372d949a4df07ea3a4 Mon Sep 17 00:00:00 2001 From: Alex Cui Date: Wed, 15 May 2024 11:43:57 +0800 Subject: [PATCH] Fix collapse when creating a custom procedure with % in label --- blocks_vertical/procedures.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocks_vertical/procedures.js b/blocks_vertical/procedures.js index 1d2d2153a6..97f12cbe80 100644 --- a/blocks_vertical/procedures.js +++ b/blocks_vertical/procedures.js @@ -572,7 +572,7 @@ Blockly.ScratchBlocks.ProcedureUtils.updateDeclarationProcCode_ = function() { } var input = this.inputList[i]; if (input.type == Blockly.DUMMY_INPUT) { - this.procCode_ += input.fieldRow[0].getValue(); + this.procCode_ += input.fieldRow[0].getValue().replace('%', '\\%'); } else if (input.type == Blockly.INPUT_VALUE) { // Inspect the argument editor. var target = input.connection.targetBlock();