-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v- without directive name accidentally parsed as v-slot #4494
Labels
Comments
HerringtonDarkholme
added a commit
to HerringtonDarkholme/vue-next
that referenced
this issue
Sep 2, 2021
yyx990803
pushed a commit
that referenced
this issue
Sep 2, 2021
closed via #4495 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Version
3.2.7
Reproduction link
vue-next-template-explorer.netlify.app
Steps to reproduce
Input code like
<template v->123</template>
in template explorer or sfc playground.What is expected?
Vue should report missing directive name error and treat
v-
as a plain attribute.What is actually happening?
v-
is parsed asv-slot
.It's probably an implementation specific behavior. When the regex
v-
matches nothing, vue fallbacks toslot
https://github.com/vuejs/vue-next/blob/master/packages/compiler-core/src/parse.ts#L779-L791
The text was updated successfully, but these errors were encountered: