Closed jukben closed 5 years ago
The regex for named imports
/{(([a-zA-Z0-9]*[, ]?)*)}/;
is wrong. Identifier could be also with _ thus in that case it gets stuck (because it can't reach } ).
_
}
Correct is
/{(([a-zA-Z0-9_]*[, ]?)*)}/;
which is basically
/{((\w*[, ]?)*)}/;
but it's still unnecessary complex, simple {(.*)} should do the trick (and it does :) )!
{(.*)}
The regex for named imports
is wrong. Identifier could be also with
_
thus in that case it gets stuck (because it can't reach}
).Correct is
which is basically
but it's still unnecessary complex, simple
{(.*)}
should do the trick (and it does :) )!