diff options
author | Matthew Sotoudeh <matthewsot@outlook.com> | 2017-07-30 00:24:28 -0700 |
---|---|---|
committer | Matthew Sotoudeh <matthewsot@outlook.com> | 2017-07-30 00:24:28 -0700 |
commit | 2240954b45e203a18507d9c50f179e63fd35db78 (patch) | |
tree | 4478d06d8582ae3e2be4fab3821b96ef974fd25d | |
parent | f834df78f82f9285781bee71e862f67e999343bb (diff) |
fixed blank lines issue
-rw-r--r-- | interpreter/interpreter.js | 6 |
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 |