remarkable-mentions
v0.1.0
Published
Transform @ mentions into markdown links.
Downloads
112
Maintainers
Readme
remarkable-mentions
Transform @ mentions into markdown links.
Install
Install with npm:
$ npm install --save remarkable-mentions
Usage
var mentions = require('remarkable-mentions');
API
mentions
Remarkable plugin that will turn all @ mentions into a link. This is done just after block tokenizing to ensure that the inline blocks are transformed before links are transformed. This also ensures that @ mentions inside code blocks are not transformed.
Params
options
{Object}: Options to control how the @ mentions are transformed. See to-mention-link for more options.options.url
{String}: Customize the url that is used in the links. Defaults to "https://github.com".returns
{Function}: Remarkable plugin function that can be passed to the.use
method.
Example
var md = new Remarkable();
md.use(mentions());
var html = md.render(markdown);
About
Related projects
- markdown-link: Micro util for generating a single markdown link. | homepage
- parse-mentions: Parse and optionally replace @ mentions from a string of text. | homepage
- remarkable: Markdown parser, done right. 100% Commonmark support, extensions, syntax plugins, high speed - all in… more | homepage
- to-mention-link: Create links from @ mentions. | homepage
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Please read the contributing guide for avice on opening issues, pull requests, and coding standards.
Building docs
(This document was generated by verb-generate-readme (a verb generator), please don't edit the readme directly. Any changes to the readme must be made in .verb.md.)
To generate the readme and API documentation with verb:
$ npm install -g verb verb-generate-readme && verb
Running tests
Install dev dependencies:
$ npm install -d && npm test
Author
Brian Woodward
License
Copyright © 2016, Brian Woodward. Released under the MIT license.
This file was generated by verb-generate-readme, v0.1.30, on September 24, 2016.