vuejs / repl

Vue SFC REPL as a Vue 3 component
https://repl-vuejs.vercel.app
MIT License
904 stars 159 forks source link

[bug]: $0 or $1 added in placeholders with monaco #250

Open icarusgk opened 3 months ago

icarusgk commented 3 months ago

Description

It seems this bug was introduced in this commit: https://github.com/vuejs/repl/commit/295c0e809d980fc04dcac86efc3e64044218792a when upgrading the @volar/monaco package from 1.9.2 to 1.10.5. The first ocurrence of this bug in the Volar.js repo happens after the 1.9.2 version and before 1.10.0 version. Specifically in this set of commits.

How to reproduce

When the first option provided by Intellisense is selected, a $1 will be appended to either:

- The component's name

When importing a component and selecting the first option provided by Intellisense the component is imported with a $1 appended to the end of the Component's name.

comp

- The placeholder for an attribute

attr

- The placeholder for an event handler

event

- The placeholder for interpolation

inter

sxzz commented 3 months ago

/cc @johnsoncodehk Could you help us upgrade Volar to v2 #225 and fix this bug?