Skip to content
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

Closed
HerringtonDarkholme opened this issue Sep 2, 2021 · 1 comment
Closed

Comments

@HerringtonDarkholme
Copy link
Member

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 as v-slot.


It's probably an implementation specific behavior. When the regex v- matches nothing, vue fallbacks to slot
https://github.com/vuejs/vue-next/blob/master/packages/compiler-core/src/parse.ts#L779-L791

@yyx990803
Copy link
Member

closed via #4495

@github-actions github-actions bot locked and limited conversation to collaborators Oct 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants