markdown-it-diaspora-mention
diaspora-style @mention plugin for markdown-it markdown parser.
@{user@pod.tld}
=> @<a href="/people/1337" class="mention">User Name</a>
@{User Name; user@pod.tld}
=> @<a href="/people/1337" class="mention">User Name</a>
Install
node.js, bower:
npm install markdown-it-diaspora-mention --savebower install markdown-it-diaspora-mention --save
Use
var md = ; md; // => "@<a href='/people/1337' class='mention'>User Name</a>"md; // => "@<a href='/people/1337' class='mention'>Alice Awesome</a>"md; // => "@<a href='/my/awesome/url' class='mention hovercardable'>Foo Bar</a>"
Differences in the browser. If you load the script directly into the page, without a
package system, the module will add itself globally as window.markdownitDiasporaMention
.