Open jimallman opened 10 years ago
See the last regex entry in this discussion: http://www.regexguru.com/2008/11/detecting-urls-in-a-block-of-text/
This works by only allowing matching parenthesis in a URL. So, you don't have to worry about the above case.
I'll look at this more in the next few days, unless someone beats me to it. :)
I just pushed a PR for this.
These chat messages will embed the specified image:
... but this one fails (presumably because of the trailing parenthesis):