26fa3bffeb
This logic is torture and needs some rework. Rules: - Always strip leading (, as it can't be part of a URL - Short circuit to only strip leading if no trailing - If valid email address when trailing ) stripped, we can strip trailing ) - If not even a valid URL without trailing ), short circuit to only strip leading - If query parameters detected, strip trailing. It should have been encoded as %29. - If there isn't a / the trailing ) can't be part of the URL, strip trailing. - If there isn't at least one ( in the URI.path, only strip leading. Assume ) is not part of the URL. - If we have an equal count of ( and ) chars with the leading ( already stripped, only strip leading |
||
---|---|---|
.. | ||
builder_test.exs | ||
linkify_test.exs | ||
parser_test.exs | ||
test_helper.exs |