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

Syntax highlighting fails for event handlers with colons in the event name. #3524

Open
4 tasks done
andrewsm80 opened this issue Sep 10, 2022 · 0 comments
Open
4 tasks done

Comments

@andrewsm80
Copy link

andrewsm80 commented Sep 10, 2022

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ
  • I have tried restarting VS Code or running Vetur: Restart VLS

Info

  • Platform: Windows 10
  • Vetur version: v0.36.0
  • VS Code version: v1.71.0

Problem

Syntax highlighting fails for event handlers with colons in the event name.

For example, if I have a component <my-component> that emits an event as such: this.$emit("update:someValue", someValue),
then syntax highlighting will fail when I attach event handlers to <my-component> from the parent component.

vetur-bug

Event names in the form "update:propName" are recommended by the Vue docs for events that update props, so this pattern should also be supported by Vetur.

Reproducible Case

  1. Open a new tab in VSCode.
  2. Change language mode to Vue.
  3. Paste the following into the editor
<template>
  <my-component 
    v-on:update:someValue="value => foo.bar.setValue(baz, value)"
    v-on:updateSomeValue="value => foo.bar.setValue(baz, value)"
  ></my-component>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants