[Pkg-javascript-commits] [node-shell-quote] 94/137: Update algo description

Bastien Roucariès rouca at moszumanska.debian.org
Fri Aug 25 19:19:42 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-shell-quote.

commit e1442cfe0521497b59a8204eb1e4d6c4202d42b9
Author: Stephen Sugden <me at stephensugden.com>
Date:   Thu Oct 17 18:10:57 2013 -0700

    Update algo description
---
 index.js | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/index.js b/index.js
index 7ecd705..9f2571b 100644
--- a/index.js
+++ b/index.js
@@ -62,14 +62,13 @@ function parse (s, env) {
         //
         //  1. inside single quotes, all characters are printed literally.
         //  2. inside double quotes, all characters are printed literally
-        //     except variables prefixed by '$' and double quotes prefixed by
-        //     a backslash.
-        //  3. outside of any quotes, backslashes are not printed unless they
-        //     are escaped.
+        //     except variables prefixed by '$' and backslashes followed by
+        //     either a double quote or another backslash.
+        //  3. outside of any quotes, backslashes are treated as escape
+        //     characters and not printed (unless they are themselves escaped)
         //  4. quote context can switch mid-token if there is no whitespace
         //     between the two quote contexts (e.g. all'one'"token" parses as
         //     "allonetoken")
-
         var SQ = "'";
         var DQ = '"';
         var BS = '\\';

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-shell-quote.git



More information about the Pkg-javascript-commits mailing list