summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sotoudeh <matthewsot@outlook.com>2017-07-30 00:24:28 -0700
committerMatthew Sotoudeh <matthewsot@outlook.com>2017-07-30 00:24:28 -0700
commit2240954b45e203a18507d9c50f179e63fd35db78 (patch)
tree4478d06d8582ae3e2be4fab3821b96ef974fd25d
parentf834df78f82f9285781bee71e862f67e999343bb (diff)
fixed blank lines issue
-rw-r--r--interpreter/interpreter.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/interpreter/interpreter.js b/interpreter/interpreter.js
index 1fe624e..086fd0f 100644
--- a/interpreter/interpreter.js
+++ b/interpreter/interpreter.js
@@ -140,7 +140,11 @@ Yaepl.prototype.interpretLine = function (line, callback, addToHistory) {
}
if (line.indexOf("//") > -1) {
- line = line.substring(0, line.indexOf("//"));
+ line = line.substring(0, line.indexOf("//")).trim();
+ }
+
+ if (line.length == 0) {
+ return callback();
}
//Handle the start of custom ops
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback