remark plug-in to transform
references and definitions into normal links and images.
Installation
npm:
npm install remark-inline-links
remark-inline-links is also available as an AMD, CommonJS, and
globals module, uncompressed and compressed.
Usage
Dependencies:
var remark = require('remark');
var inlineLinks = require('remark-inline-links');
Process:
var doc = remark().use(inlineLinks).process([
'[foo], [foo][], [bar][foo].',
'',
'![foo], ![foo][], ![bar][foo].',
'',
'[foo]: http://example.com "Example Domain"',
''
].join('\n'));
Yields:
[foo](http://example.com "Example Domain"), [foo](http://example.com "Example Domain"), [bar](http://example.com "Example Domain").
![foo](http://example.com "Example Domain"), ![foo](http://example.com "Example Domain"), ![bar](http://example.com "Example Domain").
API
Transform references and definitions into normal links and images.
Related
License
MIT © Titus Wormer