autolink-js icon indicating copy to clipboard operation
autolink-js copied to clipboard

Regex misses links after \n or <br /> (ex: <br />http://google.com)

Open hardy613 opened this issue 10 years ago • 4 comments

I made local changes the start of the regex

 (^|\s)

to

(^|[\n\s>])

and that is catching the missing edge cases. How it reads: from the start of the string or after any \n (newline) \s (space) or >

hardy613 avatar Mar 17 '14 15:03 hardy613

Can you submit a PR with this change? :+1:

bryanwoods avatar Mar 24 '14 22:03 bryanwoods

for sure!

hardy613 avatar Mar 25 '14 02:03 hardy613

This still isn't updated.

JoshuaNovak919 avatar Dec 09 '14 21:12 JoshuaNovak919

theres a fix in a PR I sent, it can be seen here https://github.com/bryanwoods/autolink-js/tree/hardy613-master (NOTE: its not the current branch)

On Tue, Dec 9, 2014 at 4:59 PM, JoshuaNovak919 [email protected] wrote:

This still isn't updated.

— Reply to this email directly or view it on GitHub https://github.com/bryanwoods/autolink-js/issues/13#issuecomment-66366134 .

Scott Hardy

[email protected]

hardy613 avatar Dec 09 '14 22:12 hardy613