Skip to content

Commit 1cf8d88

Browse files
committed
fix(vscode): let linkedEditing work when tag name contains .
1 parent 6180537 commit 1cf8d88

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/language-server/src/plugins/html/HTMLPlugin.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,12 @@ export class HTMLPlugin
333333
return null;
334334
}
335335

336-
return { ranges };
336+
// Note that `.` is excluded from the word pattern. This is intentional to support property access in Svelte component tags.
337+
return {
338+
ranges,
339+
wordPattern:
340+
'(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\^\\&\\*\\(\\)\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\\'\\"\\,\\<\\>\\/\\s]+)'
341+
};
337342
}
338343

339344
getFoldingRanges(document: Document): FoldingRange[] {

0 commit comments

Comments
 (0)