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
The current comment grammar eats up the slash and flags after a comment when using the x flag:
const re = `/
# A regular expression for date.
(?<year>\d{4})- # year part of a date
(?<month>\d{2})- # month part of a date
(?<day>\d{2}) # day part of a date /x`; // \/\w* shouldn't get eaten
This yields "SyntaxError: Unexpected end of input". See pull request for fix and changed test to match. Thanks!