markdown-it-twitter
v0.0.2
Published
Twitter mentions and hashtag links in markdown-it
Downloads
1
Maintainers
Readme
markdown-it-twitter
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>
Install
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
Tests are run with npm:
npm install
npm test