Skip to content

Autocomplete does not work within string templates #2

@iangrams

Description

@iangrams

Firstly, thanks for this plugin, it's immensely helpful!

However, when I'm editing JSX and am within a string template the autocomplete stops working. Seems it only looks for className= with single or double quotes. Would be helpful for React dev if it also worked within string templates.

I believe updating the RegEx on line 149 to something like \bclass(Name)?={*[`"\']([^"\']*)$ should do the trick.

These work:
className='fill-current border-'
className="fill-current border-"

But this does not:
className={`fill-current border-`}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions