Created
May 27, 2011 15:11
-
-
Save joemccann/995448 to your computer and use it in GitHub Desktop.
Use of link method for linkifying tweets.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Courtesy of @redwolves | |
String.prototype.linkify = function() { return this.replace(/[A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&\?\/.=]+/, function(m) { return m.link(m) }) }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I believe you are missing a '}' at the end of the line.