Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intellisense not working after regex containing <style> tag #929

Open
Kenrick0 opened this issue Mar 20, 2024 · 0 comments
Open

Intellisense not working after regex containing <style> tag #929

Kenrick0 opened this issue Mar 20, 2024 · 0 comments

Comments

@Kenrick0
Copy link

What version of VS Code are you using?
v1.87.2

What version of Tailwind CSS IntelliSense are you using?
v0.10.5

What version of Tailwind CSS are you using?
v3.4.1

What package manager are you using?
pnpm

What operating system are you using?
Ubuntu

Tailwind config

import type { Config } from "tailwindcss";

export default {
  content: ["./{pages,layouts,components,src}/**/*.{html,js,jsx,ts,tsx,vue,mdx}"],
  theme: {
    extend: {},
  },
  plugins: [],
} satisfies Config;

Reproduction

Save the below code as a file with a tsx extension in a react project.

export default function Page() {
    let styles = "html string".match(/<style>[\s\S]*?<\/style>/m)

    return <div className="border-gray-200">{styles}</div>
}

Describe your issue

There are no tailwindcss-intellisense suggestions/highlighting in the div className, I suspect the style tag in the regex is confusing the extension. I expected intellisense to work as normal.
image

If I remove the regex suggestions/hints start working:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant