Closed SaschaDens closed 4 years ago
I've merged, but compiling throws the following error:
Argument of type 'RegExp | undefined' is not assignable to parameter of type 'string'.
Mind taking a look into this and submitting a PR with a fix? @SaschaDens
Sure, will look into it.
This feature request is created for the open issue #4 and allows user to configure a custom regex based on the user requirements.
The default regex
\bclass(?:Name)*\s*=\s*([\"\']([_a-zA-Z0-9\s\-\:]+)[\"\'])
matches the following patternsclass
className
In case a capturing group is used in the regex the user needs to ensure that the group is non-capturing or else a weird behaviour can occur.
This is related to the following snippet: https://github.com/heybourn/headwind/blob/d77b0fbabd0554ab67871f4bdac2ffd6f5844c45/src/extension.ts#L20-L21