no need for escapeNewline

This commit is contained in:
Evan You 2016-04-11 01:00:19 -04:00
parent cdfaa7b131
commit d5c1c3a640

View File

@ -109,17 +109,13 @@ function genText (text) {
} else {
const exp = parseText(text)
if (exp) {
return 'String(' + escapeNewlines(exp) + ')'
return 'String(' + exp + ')'
} else {
return escapeNewlines(JSON.stringify(text))
return JSON.stringify(text)
}
}
}
function escapeNewlines (str) {
return str.replace(/\n/g, '\\n')
}
function getAttr (el, attr) {
let val
if (val = el.attrsMap[attr]) {