summaryrefslogtreecommitdiff
path: root/byob.js
diff options
context:
space:
mode:
authorGubolin <gubolin@fantasymail.de>2014-12-07 12:39:09 +0100
committerGubolin <gubolin@fantasymail.de>2014-12-07 12:39:09 +0100
commit3c6380dfa5866cf3425f44b1d1eb08ef5c3baf1b (patch)
tree8558ef0b3932b65fb5625006763f9060b6f05f77 /byob.js
parent295d1412f231d68c2669e61bfb7a1e1103b3b5ed (diff)
parent8338384bf572beb06ebd12a0c9af18029e99262a (diff)
downloadsnap-3c6380dfa5866cf3425f44b1d1eb08ef5c3baf1b.tar.gz
snap-3c6380dfa5866cf3425f44b1d1eb08ef5c3baf1b.zip
merge master
Diffstat (limited to 'byob.js')
-rw-r--r--byob.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/byob.js b/byob.js
index a17f976..b5905ce 100644
--- a/byob.js
+++ b/byob.js
@@ -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;