remark-inline-links
remark plugin to transform references and definitions into normal links and images.
Note!
This plugin is ready for the new parser in remark
(remarkjs/remark#536
).
The current and previous versions of the plugin work with the current and
previous versions of remark.
Install
npm:
npm install remark-inline-links
Use
Say we have the following file, example.md
:
[foo], [foo][], [bar][foo]. ![foo], ![foo][], ![bar][foo]. [foo]: http://example.com "Example Domain"
And our script, example.js
, looks as follows:
var fs = var remark = var links =
Now, running node example
yields:
[foo](http://example.com "Example Domain"), [foo](http://example.com "Example Domain"), [bar](http://example.com "Example Domain"). , , .
API
remark().use(inlineLinks)
Plugin to transform references and definitions into normal links and images.
Security
Use of remark-inline-links
does not involve rehype
(hast) or user content so there are no openings for
cross-site scripting (XSS) attacks.
Related
remark-bookmarks
— Link managerremark-reference-links
— Reverse ofremark-inline-links
, thus rewriting normal links and images into references and definitionsremark-defsplit
— Practically the same asremark-reference-links
, but with URI-based identifiers instead of numerical onesremark-unlink
— Remove all links, references and definitions
Contribute
See contributing.md
in remarkjs/.github
for ways
to get started.
See support.md
for ways to get help.
This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.