JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 184935
  • Score
    100M100P100Q168164F
  • License MIT

Transform links and images into references and definitions

Package Exports

  • remark-reference-links

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (remark-reference-links) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

remark-reference-links Build Status Coverage Status Chat

remark plug-in to transform links and images into references and definitions.

Installation

npm:

npm install remark-reference-links

Usage

var remark = require('remark');
var referenceLinks = require('remark-reference-links');

var file = remark().use(referenceLinks).processSync([
  '[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").',
  ''
].join('\n'));

console.log(String(file));

Yields:

[foo][1], [foo][1], [bar][1].

![foo][1], ![foo][1], ![bar][1].

[1]: http://example.com "Example Domain"

API

Transform links and images into references and definitions.

  • wooorm/remark-inline-links — Reverse, thus rewriting references and definitions into normal links and images;
  • eush77/remark-defsplit — Reverse, thus rewriting references and definitions into normal links and images, but with URI-based identifiers instead of numerical ones.

License

MIT © Titus Wormer