summaryrefslogtreecommitdiff
path: root/byob.js
diff options
context:
space:
mode:
authorJens Mönig <jens@moenig.org>2014-09-30 09:30:02 +0200
committerJens Mönig <jens@moenig.org>2014-09-30 09:30:02 +0200
commit21b941012cc286dd3c1ce1dc8e39a52a42d2af95 (patch)
tree91d75ee5031d2cd820ba70cb0aa0d45b19011ba6 /byob.js
parent29b47cc2d2ebb87eec7a40313992181d5e99c95d (diff)
parent55d04ca5f2a80ec815531510f68616ea22618abb (diff)
downloadsnap-byow-21b941012cc286dd3c1ce1dc8e39a52a42d2af95.tar.gz
snap-byow-21b941012cc286dd3c1ce1dc8e39a52a42d2af95.zip
Merge pull request #548 from Gubolin/issue_361
allow percent symbols in custom block texts (fix #361), thanks again @Gubolin, both for the fix and for your patience!
Diffstat (limited to 'byob.js')
-rw-r--r--byob.js4
1 files changed, 2 insertions, 2 deletions
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));
}
});