pairwise-tech / pairwise

The Pairwise Codebase
https://app.pairwise.tech
6 stars 0 forks source link

Fix ios webkit regex #250

Closed iansinnott closed 3 years ago

iansinnott commented 3 years ago

We had a regex that seemed to be throwing errors in safari on ios. Apparently our old regex is not supported in apple products.

I tested in the iOS simulator.

iansinnott commented 3 years ago

@no-stack-dub-sack it seems that safari was having issues with that regex, which is why this PR exists. Was working fine on my comp but mobile safari was just hanging on the loading screen.

Let me know if you see anything wrong with the new regex. Not sure if there are edge cases I'm missing.

bonham000 commented 3 years ago

I changed the test regex and confirmed this should produce the correct results and also work for iOS (tested on iOS simulator).

To be honest, I have no idea how to write regexes well, so this is just my trial-and-error approach which seemed to produce the desired result 🤷