The merged PR #3127 attempted amongst other things to eliminate the possibility of the parser outputting nested links. Unfortunately, it seems to have missed one case: certain "url" tags that span multiple lines.
For example, this two-line "url" tag:
currently results in nested links (a link to example2 being nested in a link to example1).
It looks to me that the fix is simply to add to the regexes in mycode_auto_url() an "s" modifier on top of the existing "i" and "u" modifiers (so that the initial part of the regexes matching HTML links detects HTML links that run over multiple lines).
For example, this two-line "url" tag:
[url=http://example1.com]http://example2.com
[/url]
currently results in nested links (a link to example2 being nested in a link to example1).
It looks to me that the fix is simply to add to the regexes in mycode_auto_url() an "s" modifier on top of the existing "i" and "u" modifiers (so that the initial part of the regexes matching HTML links detects HTML links that run over multiple lines).