|
|
|
@ -648,7 +648,12 @@ function parseEnvelopeAddresses(list) {
|
|
|
|
|
|
|
|
|
|
function parseExpr(o, literals, result, start, useBrackets) {
|
|
|
|
|
start = start || 0;
|
|
|
|
|
var inQuote = false, lastPos = start - 1, isTop = false, val, isBody = false;
|
|
|
|
|
var inQuote = false,
|
|
|
|
|
lastPos = start - 1,
|
|
|
|
|
isTop = false,
|
|
|
|
|
isBody = false,
|
|
|
|
|
escaping = false,
|
|
|
|
|
val;
|
|
|
|
|
|
|
|
|
|
if (useBrackets === undefined)
|
|
|
|
|
useBrackets = true;
|
|
|
|
@ -669,7 +674,8 @@ function parseExpr(o, literals, result, start, useBrackets) {
|
|
|
|
|
}
|
|
|
|
|
} else if (o.str[i] === '"')
|
|
|
|
|
inQuote = true;
|
|
|
|
|
else if (o.str[i] === ' ' || o.str[i] === ')'
|
|
|
|
|
else if (o.str[i] === ' '
|
|
|
|
|
|| o.str[i] === ')'
|
|
|
|
|
|| (useBrackets && o.str[i] === ']')) {
|
|
|
|
|
if (i - (lastPos + 1) > 0) {
|
|
|
|
|
val = convStr(o.str.substring(lastPos + 1, i), literals);
|
|
|
|
@ -691,12 +697,13 @@ function parseExpr(o, literals, result, start, useBrackets) {
|
|
|
|
|
result.push(innerResult);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else if (o.str[i] === '"' &&
|
|
|
|
|
(o.str[i - 1] &&
|
|
|
|
|
(o.str[i - 1] !== '\\'
|
|
|
|
|
|| (o.str[i - 2] && o.str[i - 2] === '\\')
|
|
|
|
|
)))
|
|
|
|
|
inQuote = false;
|
|
|
|
|
} else if (o.str[i] === '\\')
|
|
|
|
|
escaping = !escaping;
|
|
|
|
|
else if (o.str[i] === '"') {
|
|
|
|
|
if (!escaping)
|
|
|
|
|
inQuote = false;
|
|
|
|
|
escaping = false;
|
|
|
|
|
}
|
|
|
|
|
if (i + 1 === len && len - (lastPos + 1) > 0)
|
|
|
|
|
result.push(convStr(o.str.substring(lastPos + 1), literals));
|
|
|
|
|
}
|
|
|
|
|