initial attempt at matching @twitter username automatically

This commit is contained in:
Rob Sutherland 2012-05-11 11:54:11 -05:00
parent 3c52317851
commit 6426b63a4a

View File

@ -1129,6 +1129,9 @@ var _DoAutoLinks = function(text) {
text = text.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi,"<a href=\"$1\">$1</a>"); text = text.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi,"<a href=\"$1\">$1</a>");
// Twitter: @twitter_username
text = text.replace(/\s@([-\w])/gi,"<a href=\"http://twitter.com/$1>$1</a>");
// Email addresses: <address@domain.foo> // Email addresses: <address@domain.foo>
/* /*