You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2019/12/18 17:56:37 UTC

[couchdb-escodegen] 01/01: Adds support for skipping string escapement upon request (required for supporting QuotedLiterals from sweet.js).

This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to reference refs/pull/103/head
in repository https://gitbox.apache.org/repos/asf/couchdb-escodegen.git

commit 306fafcb0f17a334b6567440569cf8f9a38a8022
Author: Jonathan Leonard <jo...@gmail.com>
AuthorDate: Tue Jun 25 19:29:15 2013 -0500

    Adds support for skipping string escapement upon request (required for supporting QuotedLiterals from sweet.js).
---
 escodegen.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/escodegen.js b/escodegen.js
index e8373ce..a8ee2a0 100644
--- a/escodegen.js
+++ b/escodegen.js
@@ -1363,7 +1363,8 @@
             }
 
             if (typeof expr.value === 'string') {
-                result = escapeString(expr.value);
+                if (expr.noEscape) { result = expr.value; }
+                else { result = escapeString(expr.value); }
                 break;
             }