zignd / HTML-CSS-Class-Completion

:chocolate_bar: Visual Studio Code extension that provides CSS class name completion for the HTML class attribute based on the CSS files in your workspace
https://marketplace.visualstudio.com/items?itemName=Zignd.html-css-class-completion
MIT License
250 stars 83 forks source link

Add curly bracket to JS provider for use in React. #371

Open bilherron opened 2 years ago

bilherron commented 2 years ago

This PR partially addresses https://github.com/zignd/HTML-CSS-Class-Completion/issues/287 by updating the regex that matches for JS(X)/TS(X) files.

The regex uses a non-capturing group (?: to match an optional opening curly bracket before a single or double quote to trigger auto-completion. Matches the following:

className="...
className='...
className={"...
className={'...
class="...
class='...
class={"...
class={'...