mirror of
https://github.com/vuejs/vue.git
synced 2024-11-22 04:39:46 +00:00
no need for escapeNewline
This commit is contained in:
parent
cdfaa7b131
commit
d5c1c3a640
@ -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…
Reference in New Issue
Block a user