mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
[-] Added support for github @mentions
This commit is contained in:
parent
2e102c72b2
commit
6dd8e679ca
|
@ -14,6 +14,14 @@
|
||||||
replace : function(match, prefix, content, suffix) {
|
replace : function(match, prefix, content, suffix) {
|
||||||
return '<del>' + content + '</del>';
|
return '<del>' + content + '</del>';
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// @mentions
|
||||||
|
type : 'lang',
|
||||||
|
regex : '(@([A-Za-z0-9-_]+))',
|
||||||
|
replace : function(match, content, user) {
|
||||||
|
return '<a href="//github.com/' + user + '">' + content + '</a>'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user