Skip to content

Instantly share code, notes, and snippets.

@joemccann
Created May 27, 2011 15:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joemccann/995448 to your computer and use it in GitHub Desktop.
Save joemccann/995448 to your computer and use it in GitHub Desktop.
Use of link method for linkifying tweets.
// 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) }) };
@macdonst
Copy link

I believe you are missing a '}' at the end of the line.

@joemccann
Copy link
Author

Good catch...thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment