feat(sfc): accept inMap in compileTemplate()
This commit is contained in:
@@ -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]:
|
||||
|
||||
@@ -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, '<!--')) {
|
||||
@@ -963,9 +963,9 @@ function getNewPosition(
|
||||
function emitError(
|
||||
context: ParserContext,
|
||||
code: ErrorCodes,
|
||||
offset?: number
|
||||
offset?: number,
|
||||
loc: Position = getCursor(context)
|
||||
): void {
|
||||
const loc = getCursor(context)
|
||||
if (offset) {
|
||||
loc.offset += offset
|
||||
loc.column += offset
|
||||
|
||||
Reference in New Issue
Block a user