From: Evan You Date: Tue, 10 Dec 2019 20:30:17 +0000 (-0500) Subject: fix(compiler-core): should only parse interpolations in DATA text mode X-Git-Tag: v3.0.0-alpha.0~79 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=95b2cb6fd26790f3f371c8475e9fdc4b3f2ee02d;p=thirdparty%2Fvuejs%2Fcore.git fix(compiler-core): should only parse interpolations in DATA text mode --- diff --git a/packages/compiler-core/src/parse.ts b/packages/compiler-core/src/parse.ts index 6ed4e8bb5b..a26923e77c 100644 --- a/packages/compiler-core/src/parse.ts +++ b/packages/compiler-core/src/parse.ts @@ -117,58 +117,64 @@ function parseChildren( const s = context.source let node: TemplateChildNode | TemplateChildNode[] | undefined = undefined - if (!context.inPre && startsWith(s, context.options.delimiters[0])) { - // '{{' - node = parseInterpolation(context, mode) - } else if (mode === TextModes.DATA && s[0] === '<') { - // https://html.spec.whatwg.org/multipage/parsing.html#tag-open-state - if (s.length === 1) { - emitError(context, ErrorCodes.EOF_BEFORE_TAG_NAME, 1) - } else if (s[1] === '!') { - // https://html.spec.whatwg.org/multipage/parsing.html#markup-declaration-open-state - if (startsWith(s, '