diff options
| author | Gubolin <gubolin@fantasymail.de> | 2014-12-07 12:18:13 +0100 |
|---|---|---|
| committer | Gubolin <gubolin@fantasymail.de> | 2014-12-07 12:18:13 +0100 |
| commit | 86d05bae6b28b26f4ddbaf2702bcc30e52be946b (patch) | |
| tree | 6469c19324390ca2cd47efeb1bc0a8c36c5b4cab /byob.js | |
| parent | d3be78cbedce2d9990c1efe6abf304dde69ba19a (diff) | |
| parent | 8338384bf572beb06ebd12a0c9af18029e99262a (diff) | |
| download | snap-issue_460.tar.gz snap-issue_460.zip | |
merge upstreamissue_460
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; |
