From: Evan You Date: Thu, 7 Nov 2019 01:52:19 +0000 (-0500) Subject: fix(compiler-core): should not condense whitespace in RAWTEXT mode X-Git-Tag: v3.0.0-alpha.0~228 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4b739e3bc09e4693a5c356ee432520a1c507731e;p=thirdparty%2Fvuejs%2Fcore.git fix(compiler-core): should not condense whitespace in RAWTEXT mode --- diff --git a/packages/compiler-core/src/parse.ts b/packages/compiler-core/src/parse.ts index 57f21680f3..3dcef5106a 100644 --- a/packages/compiler-core/src/parse.ts +++ b/packages/compiler-core/src/parse.ts @@ -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) {