mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
initial attempt at matching @twitter username automatically
This commit is contained in:
parent
3c52317851
commit
6426b63a4a
|
@ -1129,6 +1129,9 @@ var _DoAutoLinks = function(text) {
|
|||
|
||||
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>
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue
Block a user