very wip markdown parsing for twitter hashtags/mentions
forked from https://github.com/flowdock/markdown-it-flowdock
flowdock hashtag (
#tag
), mentions (@user
) and relaxed autolink plugin for markdown-it markdown parser.
@user
=><a class="mention" href="https://twitter.com/user" target="_blank">@user</a>
#hashtag
=><span class="hashtag">#hashtag</span>
npm install markdown-it-twitter --save
var md = require('markdown-it')().use(require('markdown-it-twitter'));
md.render('Test #hashtag @user');
// 'Test <span class="hashtag">#hashtag</span> <a class="mention" href="https://twitter.com/user" target="_blank">@user</a>'
Tests are run with npm:
npm install
npm test