From 55d04ca5f2a80ec815531510f68616ea22618abb Mon Sep 17 00:00:00 2001 From: Gubolin Date: Sat, 2 Aug 2014 16:31:20 +0200 Subject: allow percent symbols in custom block texts (fix #361) --- byob.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'byob.js') diff --git a/byob.js b/byob.js index a17f976..64287ef 100644 --- a/byob.js +++ b/byob.js @@ -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)); } }); -- cgit v1.3.1