mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
Corrected initial implementation of Twitter autolinks
This commit is contained in:
parent
6426b63a4a
commit
b03048799b
|
@ -1130,7 +1130,8 @@ 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>");
|
||||
text = text.replace(/(?:@(\w{1,15}))/gi,"<a href=\"http://twitter.com/$1\">@$1</a>");
|
||||
|
||||
|
||||
// Email addresses: <address@domain.foo>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user