diff --git a/packages/vscode-vue-languageservice/src/parsers/cssBinds.ts b/packages/vscode-vue-languageservice/src/parsers/cssBinds.ts index 0592511039..65e572c0ff 100644 --- a/packages/vscode-vue-languageservice/src/parsers/cssBinds.ts +++ b/packages/vscode-vue-languageservice/src/parsers/cssBinds.ts @@ -20,7 +20,13 @@ export function parse(docText: string, ss: css.Stylesheet) { const matchs = nodeText.matchAll(reg); for (const match of matchs) { if (match.index !== undefined) { - const matchText = match[1]; + let matchText = match[1]; + if ( + matchText.startsWith('"') && matchText.endsWith('"') + || matchText.startsWith("'") && matchText.endsWith("'") + ) { + matchText = matchText.substring(1, matchText.length - 1); + } const offset = node.offset + match.index + nodeText.substr(match.index).indexOf(matchText); result.push({ start: offset, end: offset + matchText.length }); }