Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var customMarked = function () {
return marked.apply(marked, arguments)
// emails
.replace(/([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)/g, '<a href="mailto:$1">$1</a>')
// twitter
.replace(/(\W)@(\w+)(?!(?:\w|\.\w))/g, '$1<a href="https://twitter.com/$2">@$2</a>')
// mentions
.replace(/(\W)@(\w+\.\w+)(?=\W)/g, function () {
return arguments[1] + '<a href="/members/' + arguments[2].toLowerCase() + '">@' + arguments[2] + '</a>'
})
}