You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While testing an application built with Elm, I came across an error triggered by using the dasherize() method. It seems that the RegEx [_-\\s]+ used in the method is not a legitimate expression in many languages and javascript parsers written in those languages throw an exception when executing this code because the - is seen as part of an invalid range terminated by a character group.
I'm not sure of all of the use cases, but ECMAScript seems to interpret the expression as a range without an end. But it also seems that the desired behavior (as I see it) could also be achieved using the RegEx [_\\s-]+ or even [_\-\\s]+" so that the "-" is not interpreted as a range. But it might be the case that an open ended range is required for some cases, though a range that begins with "_" seems like it would match nearly everything.
I'm not certain, so opening an issue.
The text was updated successfully, but these errors were encountered:
While testing an application built with Elm, I came across an error triggered by using the dasherize() method. It seems that the RegEx
[_-\\s]+
used in the method is not a legitimate expression in many languages and javascript parsers written in those languages throw an exception when executing this code because the-
is seen as part of an invalid range terminated by a character group.I'm not sure of all of the use cases, but ECMAScript seems to interpret the expression as a range without an end. But it also seems that the desired behavior (as I see it) could also be achieved using the RegEx
[_\\s-]+
or even[_\-\\s]+"
so that the "-" is not interpreted as a range. But it might be the case that an open ended range is required for some cases, though a range that begins with "_" seems like it would match nearly everything.I'm not certain, so opening an issue.
The text was updated successfully, but these errors were encountered: