fix(compiler): should only strip leading newline directly in pre tag

This commit is contained in:
Evan You
2020-04-08 16:44:32 -04:00
parent 84440780f9
commit be666ebd59
2 changed files with 18 additions and 6 deletions

View File

@@ -223,7 +223,7 @@ function parseChildren(
}
}
}
} else {
} else if (parent && context.options.isPreTag(parent.tag)) {
// remove leading newline per html spec
// https://html.spec.whatwg.org/multipage/grouping-content.html#the-pre-element
const first = nodes[0]