whatwg / urlpattern

URL Pattern Standard
https://urlpattern.spec.whatwg.org/
Other
157 stars 22 forks source link

Don't emit '*' when it can be confused for a modifier. (#145) #151

Closed wanderview closed 2 years ago

wanderview commented 2 years ago

This fixes one of the cases outlined in #145. When we have a matching group following by a wildcard we must be careful not to emit * for the wildcard. We don't want it to be mistaken for modifier on the previous group. So we want to generate (foo)(.*) and not (foo)*.

This change corresponds to this implementation change in chromium:

https://chromium-review.googlesource.com/c/chromium/src/+/3313642


Preview | Diff


Preview | Diff

wanderview commented 2 years ago

@domenic PTAL

wanderview commented 2 years ago

Thanks. I will fix this up after the holiday next year.