2.0.0 • Published 5 years ago

remark-prefix-links v2.0.0

Weekly downloads
7
License
MIT
Repository
github
Last release
5 years ago

remark-prefix-links

Remark plugin to prefix relative links.

Example

const remark = require('remark');
const prefixLinks = require('remark-prefix-links');

const result = remark()
  .use(prefixLinks, '/prefix')
  .processSync('Look at [this example](/example).');

console.log(result.contents);
// Look at [this example](/prefix/example).

Tip

Instead of using this as a plugin, it is also possible to just import the withPrefix function. This can e.g. be useful when transforming Markdown to HTML: to save one tree traversal, use withPrefix in a remark-rehype handler function.

2.0.0

5 years ago

1.0.2

5 years ago

1.0.1

6 years ago

1.0.0

6 years ago