From: Evan You Date: Thu, 19 Dec 2019 21:25:05 +0000 (-0500) Subject: feat(sfc): accept inMap in compileTemplate() X-Git-Tag: v3.0.0-alpha.0~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3a3a24d621465e4b444e23585e0422fd877f2f2f;p=thirdparty%2Fvuejs%2Fcore.git feat(sfc): accept inMap in compileTemplate() --- diff --git a/packages/compiler-core/src/errors.ts b/packages/compiler-core/src/errors.ts index 71c19e2616..6fd71521b5 100644 --- a/packages/compiler-core/src/errors.ts +++ b/packages/compiler-core/src/errors.ts @@ -145,7 +145,7 @@ export const errorMessages: { [code: number]: string } = { // Vue-specific parse errors [ErrorCodes.X_INVALID_END_TAG]: 'Invalid end tag.', - [ErrorCodes.X_MISSING_END_TAG]: 'End tag was not found.', + [ErrorCodes.X_MISSING_END_TAG]: 'Element is missing end tag.', [ErrorCodes.X_MISSING_INTERPOLATION_END]: 'Interpolation end sign was not found.', [ErrorCodes.X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END]: diff --git a/packages/compiler-core/src/parse.ts b/packages/compiler-core/src/parse.ts index 6c125bb0fe..fa31036ddf 100644 --- a/packages/compiler-core/src/parse.ts +++ b/packages/compiler-core/src/parse.ts @@ -372,7 +372,7 @@ function parseElement( if (startsWithEndTagOpen(context.source, element.tag)) { parseTag(context, TagType.End, parent) } else { - emitError(context, ErrorCodes.X_MISSING_END_TAG) + emitError(context, ErrorCodes.X_MISSING_END_TAG, 0, element.loc.start) if (context.source.length === 0 && element.tag.toLowerCase() === 'script') { const first = children[0] if (first && startsWith(first.loc.source, '