Skip to content

Commit cccab4d

Browse files
Make sure custom regexes apply in Vue <script> blocks (#1177)
Fixes #1050
1 parent dd673ab commit cccab4d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/tailwindcss-language-service/src/util/find.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,8 @@ export async function findClassNameAtPosition(
454454
return await findClassListsInHtmlRange(state, doc, 'html', range)
455455
}
456456

457-
if (type === 'jsx') {
458-
return await findClassListsInHtmlRange(state, doc, 'jsx', range)
457+
if (type === 'js' || type === 'jsx') {
458+
return await findClassListsInRange(state, doc, range, 'jsx')
459459
}
460460

461461
return []

packages/vscode-tailwindcss/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- Add support for `static` theme option ([#1176](https://github.com/tailwindlabs/tailwindcss-intellisense/pull/1176))
88
- Add details about theme options when hovering ([#1176](https://github.com/tailwindlabs/tailwindcss-intellisense/pull/1176))
99
- Fix parsing of `@custom-variant` shorthand in Tailwind CSS language mode ([#1183](https://github.com/tailwindlabs/tailwindcss-intellisense/pull/1183))
10+
- Make sure custom regexes apply in Vue `<script>` blocks ([#1177](https://github.com/tailwindlabs/tailwindcss-intellisense/pull/1177))
1011

1112
## 0.14.3
1213

0 commit comments

Comments
 (0)