Skip to content

Commit

Permalink
Make sure custom regexes apply in Vue <script> blocks (#1177)
Browse files Browse the repository at this point in the history
Fixes #1050
  • Loading branch information
thecrypticace authored Feb 10, 2025
1 parent dd673ab commit cccab4d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/tailwindcss-language-service/src/util/find.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,8 @@ export async function findClassNameAtPosition(
return await findClassListsInHtmlRange(state, doc, 'html', range)
}

if (type === 'jsx') {
return await findClassListsInHtmlRange(state, doc, 'jsx', range)
if (type === 'js' || type === 'jsx') {
return await findClassListsInRange(state, doc, range, 'jsx')
}

return []
Expand Down
1 change: 1 addition & 0 deletions packages/vscode-tailwindcss/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Add support for `static` theme option ([#1176](https://github.com/tailwindlabs/tailwindcss-intellisense/pull/1176))
- Add details about theme options when hovering ([#1176](https://github.com/tailwindlabs/tailwindcss-intellisense/pull/1176))
- Fix parsing of `@custom-variant` shorthand in Tailwind CSS language mode ([#1183](https://github.com/tailwindlabs/tailwindcss-intellisense/pull/1183))
- Make sure custom regexes apply in Vue `<script>` blocks ([#1177](https://github.com/tailwindlabs/tailwindcss-intellisense/pull/1177))

## 0.14.3

Expand Down

0 comments on commit cccab4d

Please sign in to comment.