Index: lib/snippets.js
===================================================================
--- a/lib/snippets.js
+++ b/lib/snippets.js
@@ -89,21 +89,26 @@
 {
   let tree = [];
 
   let escape = false;
   let withinQuotes = false;
 
   let unicodeEscape = null;
 
+  let quotesClosed = false;
+
   let call = [];
   let argument = "";
 
   for (let character of script.trim() + ";")
   {
+    let afterQuotesClosed = quotesClosed;
+    quotesClosed = false;
+
     if (unicodeEscape != null)
     {
       unicodeEscape += character;
 
       if (unicodeEscape.length == 4)
       {
         let codePoint = parseInt(unicodeEscape, 16);
         if (!isNaN(codePoint))
@@ -123,24 +128,27 @@
     }
     else if (character == "\\")
     {
       escape = true;
     }
     else if (character == "'")
     {
       withinQuotes = !withinQuotes;
+
+      if (!withinQuotes)
+        quotesClosed = true;
     }
     else if (withinQuotes || character != ";" && !/\s/.test(character))
     {
       argument += character;
     }
     else
     {
-      if (argument)
+      if (argument || afterQuotesClosed)
       {
         call.push(argument);
         argument = "";
       }
 
       if (character == ";" && call.length > 0)
       {
         tree.push(call);
Index: test/snippets.js
===================================================================
--- a/test/snippets.js
+++ b/test/snippets.js
@@ -176,16 +176,22 @@
                     "quotes, and semicolons",
                     "fo\\'\\ \\ \\\t\\\n\\;o 1 2 3; 'b a  r' 1 2",
                     [["fo'  \t\n;o", "1", "2", "3"], ["b a  r", "1", "2"]]);
   checkParsedScript("Script containing Unicode composite characters",
                     "f\ud83d\ude42\ud83d\ude42 b\ud83d\ude02r",
                     [["f\ud83d\ude42\ud83d\ude42", "b\ud83d\ude02r"]]);
   checkParsedScript("Script with no-op commands", "foo; ;;; ;  ; bar 1",
                     [["foo"], ["bar", "1"]]);
+  checkParsedScript("Script with blank argument in the middle", "foo '' Hello",
+                    [["foo", "", "Hello"]]);
+  checkParsedScript("Script with blank argument at the end", "foo Hello ''",
+                    [["foo", "Hello", ""]]);
+  checkParsedScript("Script with consecutive blank arguments", "foo '' ''",
+                    [["foo", "", ""]]);
 
   test.done();
 };
 
 exports.testScriptCompilation = function(test)
 {
   let libraries = [
     `
