tailwindlabs / tailwindcss-intellisense

Intelligent Tailwind CSS tooling for Visual Studio Code
2.82k stars 194 forks source link

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

Open Kenrick0 opened 6 months ago

Kenrick0 commented 6 months ago

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