mirror of
https://gitee.com/vuejs/vue.git
synced 2024-12-02 03:57:36 +08:00
only preserve whitespace if it is not right after starting tag
This commit is contained in:
parent
8218eae1f9
commit
e223b87bd3
@ -112,7 +112,8 @@ export function parse (template, preserveWhitespace) {
|
||||
}
|
||||
text = currentParent.tag === 'pre' || text.trim()
|
||||
? decodeHTML(text)
|
||||
: preserveWhitespace ? ' ' : null
|
||||
// only preserve whitespace if its not right after a starting tag
|
||||
: preserveWhitespace && currentParent.children.length ? ' ' : null
|
||||
if (text) {
|
||||
let expression
|
||||
if (text !== ' ' && (expression = parseText(text))) {
|
||||
|
Loading…
Reference in New Issue
Block a user