vuejs / language-tools

⚡ High-performance Vue language tooling based-on Volar.js
https://marketplace.visualstudio.com/items?itemName=Vue.volar
MIT License
5.55k stars 373 forks source link

Incorrect auto-complete for tag-like string in template literals #4403

Open immccn123 opened 1 month ago

immccn123 commented 1 month ago

I've encountered an issue with the plugin incorrectly handling tag-like strings within template literals. Below is a example that reproduces the problem:

<template>
  {{ "<this_is_a_tag_like string>" }}
</template>

https://github.com/vuejs/language-tools/assets/41335471/c7e018d6-c23f-4140-9cbe-4a642f5f6423

In this example, the plugin incorrectly interprets the string <this_is_a_tag_like string> as an HTML tag. This should be treated as a regular string within the template context.

More Example

https://github.com/vuejs/language-tools/assets/41335471/e692197c-8322-4316-b261-b02c4104751e

While this issue does not significantly affect functionality, it does lead to a less smooth development experience. I would appreciate it if this issue could be addressed in a future update.

Plugin version: 2.0.19