in reply to Re: Re: Automatically hyperlinking text fails with newlines
in thread Automatically hyperlinking text fails with newlines
This being the case, I would (still) slurp the entire file, not replace \n, and put \n among the acceptable characters in the regexp (and I *think* you may have to use the /s modifier). I would then replace the \n still embedded in the href.
Not perfect, because this:
Ehi, check this out on http://cnn.com\n dude!would yield: http://cnn.comdude. In other words, if you want ignorable newlines within URIs, then URIS must always be separated by real whitespace from the surrounding text.
Cheers,
alf
|
|---|