Skip to content

Commit

Permalink
fix(vscode): let linkedEditing work when tag name contains .
Browse files Browse the repository at this point in the history
  • Loading branch information
dyc3 committed Nov 7, 2024
1 parent 6180537 commit 1cf8d88
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/language-server/src/plugins/html/HTMLPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,12 @@ export class HTMLPlugin
return null;
}

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

getFoldingRanges(document: Document): FoldingRange[] {
Expand Down

0 comments on commit 1cf8d88

Please sign in to comment.