fix(compiler-core): should not condense whitespace in RAWTEXT mode

This commit is contained in:
Evan You 2019-11-06 20:52:19 -05:00
parent f8e7fadaae
commit 4b739e3bc0

View File

@ -215,7 +215,10 @@ function parseChildren(
// Whitespace management for more efficient output
// (same as v2 whitespance: 'condense')
let removedWhitespace = false
if (!parent || !context.options.isPreTag(parent.tag)) {
if (
mode !== TextModes.RAWTEXT &&
(!parent || !context.options.isPreTag(parent.tag))
) {
for (let i = 0; i < nodes.length; i++) {
const node = nodes[i]
if (node.type === NodeTypes.TEXT) {