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
There are several places where URL identification and treatment are failing.
We should move away from the single regex for identification, and look to some pre-handlers that are more readable too, as the regex is a magical black box that is impossible to quickly understand and extend.
So:
Add handling first - to drop out of the function if there is an @ in the URL - this is likely an email address and can be left alone.
Split the string on # and ? and store those, adding them on to the pattern at the end so that we preserve and include the hash and the query string.
Update the regex itself to recognize one letter domains like x.com.
The text was updated successfully, but these errors were encountered:
There are several places where URL identification and treatment are failing.
We should move away from the single regex for identification, and look to some pre-handlers that are more readable too, as the regex is a magical black box that is impossible to quickly understand and extend.
So:
Add handling first - to drop out of the function if there is an @ in the URL - this is likely an email address and can be left alone.
Split the string on
#
and?
and store those, adding them on to the pattern at the end so that we preserve and include the hash and the query string.Update the regex itself to recognize one letter domains like x.com.
The text was updated successfully, but these errors were encountered: