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
If the regex option is not specified, the value is treated as true in some scenarios and false in others. Only by setting the option explicitly do you get consistent behavior.
Here's a case where the regex option defaults to true:
(a|b|c)+
//=> /^(?:(a|b|c)+)$/
Here's case where the regex option defaults to false:
(a|b|c)*
//=> /^(?:(a|b|c)[^/]*?\/?)$/
I'm willing to contribute a PR to address this inconsistency.
The text was updated successfully, but these errors were encountered:
This inconsistency seems to have lived long enough that a lot of tests depend on it one way or another. One possibility is to simply document that the default value is auto selected based on the context. Please let me know how you would like to proceed. If it comes down to a documentation issue, I can accept that outcome.
If the
regex
option is not specified, the value is treated as true in some scenarios and false in others. Only by setting the option explicitly do you get consistent behavior.Here's a case where the regex option defaults to true:
Here's case where the regex option defaults to false:
I'm willing to contribute a PR to address this inconsistency.
The text was updated successfully, but these errors were encountered: