summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sotoudeh <matthewsot@outlook.com>2017-07-31 21:55:30 -0700
committerMatthew Sotoudeh <matthewsot@outlook.com>2017-07-31 21:55:30 -0700
commit5610444b3d784176d4522eb4f236bb013e7b7d11 (patch)
tree739f27f2da924e44d6bb3c5c69425da70786ac53
parentd22e94589a8e744428763626cc8290418ec999b0 (diff)
fixed param splitting
-rw-r--r--.gitignore1
-rw-r--r--interpreter/interpreter.js2
2 files changed, 2 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index b72f9be..d772925 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
*~
*.swp
+*.swo
diff --git a/interpreter/interpreter.js b/interpreter/interpreter.js
index a267695..34edd3f 100644
--- a/interpreter/interpreter.js
+++ b/interpreter/interpreter.js
@@ -109,7 +109,7 @@ Yaepl.prototype.splitParams = function (params) {
else if (chr === flags.quote) {
flags.quote = null;
}
- else if (chr == "\"" || chr == "'") {
+ else if ((chr == "\"" || chr == "'") && flags.quote === null) {
flags.quote = chr;
}
else if (flags.quote === null && chr == " ") {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback