We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f96075d commit 0b3350fCopy full SHA for 0b3350f
src/parsers/expression.js
@@ -37,6 +37,13 @@ var saved = []
37
/**
38
* Save replacer
39
*
40
+ * The save regex can match two possible cases:
41
+ * 1. An opening object literal
42
+ * 2. A string
43
+ * If matched as a plain string, we need to escape its
44
+ * newlines, since the string needs to be preserved when
45
+ * generating the function body.
46
+ *
47
* @param {String} str
48
* @param {String} isString - str if matched as a string
49
* @return {String} - placeholder with index
@@ -46,7 +53,7 @@ function save (str, isString) {
53
var i = saved.length
54
saved[i] = isString
55
? str.replace(newlineRE, '\\n')
- : str.replace(wsRE,'')
56
+ : str
50
57
return '"' + i + '"'
51
58
}
52
59
0 commit comments