Browse Source

no need for escapeNewline

dev
Evan You 9 years ago
parent
commit
d5c1c3a640
  1. 8
      src/compiler/codegen.js

8
src/compiler/codegen.js

@ -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]) {

Loading…
Cancel
Save