diff --git a/packages/compiler-core/src/errors.ts b/packages/compiler-core/src/errors.ts index 71c19e26..6fd71521 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 6c125bb0..fa31036d 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, '