Add a escape for % when adding a label in procedure declaration block.
Reason for Changes
This pull request fixed the collapse when creating a custom procedure with % in a label. In the function Blockly.ScratchBlocks.ProcedureUtils.updateDeclarationProcCode_, I add escape for % when adding a label to ensure all %s in label should be \% in procCode, because Scratch treats \% in procCode as a escape of %. (see blocks_vertical/procedures.js#L207)
Resolves
2107
1368
Proposed Changes
Add a escape for
%
when adding a label in procedure declaration block.Reason for Changes
This pull request fixed the collapse when creating a custom procedure with
%
in a label. In the functionBlockly.ScratchBlocks.ProcedureUtils.updateDeclarationProcCode_
, I add escape for%
when adding a label to ensure all%
s in label should be\%
in procCode, because Scratch treats\%
in procCode as a escape of%
. (see blocks_vertical/procedures.js#L207)Test Coverage
None.