committed by
GitHub
parent
d7f1b771f8
commit
c00925ed5c
@@ -775,7 +775,7 @@ function parseAttribute(
|
||||
}
|
||||
const loc = getSelection(context, start)
|
||||
|
||||
if (!context.inVPre && /^(v-|:|\.|@|#)/.test(name)) {
|
||||
if (!context.inVPre && /^(v-[A-Za-z0-9-]|:|\.|@|#)/.test(name)) {
|
||||
const match =
|
||||
/(?:^v-([a-z0-9-]+))?(?:(?::|^\.|^@|^#)(\[[^\]]+\]|[^\.]+))?(.+)?$/i.exec(
|
||||
name
|
||||
@@ -888,6 +888,11 @@ function parseAttribute(
|
||||
}
|
||||
}
|
||||
|
||||
// missing directive name or illegal directive name
|
||||
if (!context.inVPre && startsWith(name, 'v-')) {
|
||||
emitError(context, ErrorCodes.X_MISSING_DIRECTIVE_NAME)
|
||||
}
|
||||
|
||||
return {
|
||||
type: NodeTypes.ATTRIBUTE,
|
||||
name,
|
||||
|
||||
Reference in New Issue
Block a user