diff options
| author | Gubolin <gubolin@fantasymail.de> | 2015-01-03 11:24:35 +0100 |
|---|---|---|
| committer | Gubolin <gubolin@fantasymail.de> | 2015-01-03 11:24:35 +0100 |
| commit | 4bb6d3c0e3af8c379d6a63934110cde1a8e31449 (patch) | |
| tree | 52b287d291b69d87ad72db2ea81fae8ba5ef0aaa /byob.js | |
| parent | 618e034eb86b3ad7e7f4955b900862a27a0ce44c (diff) | |
| parent | 0a239b703c8c7fde5540ce63c4236522a22ee049 (diff) | |
| download | snap-4bb6d3c0e3af8c379d6a63934110cde1a8e31449.tar.gz snap-4bb6d3c0e3af8c379d6a63934110cde1a8e31449.zip | |
merge upstream
Diffstat (limited to 'byob.js')
| -rw-r--r-- | byob.js | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -106,7 +106,7 @@ SymbolMorph, isNil*/ // Global stuff //////////////////////////////////////////////////////// -modules.byob = '2014-Jun-06'; +modules.byob = '2014-November-20'; // Declarations @@ -227,7 +227,7 @@ CustomBlockDefinition.prototype.blockSpec = function () { parts = this.parseSpec(this.spec), spec; parts.forEach(function (part) { - if (part[0] === '%') { + if (part[0] === '%' && part.length > 1) { spec = myself.typeOf(part.slice(1)); } else { spec = part; @@ -311,7 +311,7 @@ CustomBlockDefinition.prototype.inputNames = function () { var vNames = [], parts = this.parseSpec(this.spec); parts.forEach(function (part) { - if (part[0] === '%') { + if (part[0] === '%' && part.length > 1) { vNames.push(part.slice(1)); } }); @@ -688,7 +688,8 @@ CustomCommandBlockMorph.prototype.labelPart = function (spec) { return CustomCommandBlockMorph.uber.labelPart.call(this, spec); } if ((spec[0] === '%') && (spec.length > 1)) { - part = new BlockInputFragmentMorph(spec.slice(1)); + // part = new BlockInputFragmentMorph(spec.slice(1)); + part = new BlockInputFragmentMorph(spec.replace(/%/g, '')); } else { part = new BlockLabelFragmentMorph(spec); part.fontSize = this.fontSize; |
