remark-inline-links
Advanced tools
Comparing version 4.0.0 to 5.0.0
@@ -8,7 +8,7 @@ 'use strict' | ||
function inlineLinks(options) { | ||
function inlineLinks() { | ||
return transformer | ||
function transformer(tree) { | ||
var definitions = getDefinitions(tree, options) | ||
var definitions = getDefinitions(tree) | ||
@@ -30,2 +30,3 @@ visit(tree, onvisit) | ||
/* istanbul ignore else - plugins could inject undefined references. */ | ||
if (definition) { | ||
@@ -32,0 +33,0 @@ image = node.type === 'imageReference' |
{ | ||
"name": "remark-inline-links", | ||
"version": "4.0.0", | ||
"version": "5.0.0", | ||
"description": "remark plugin to transform references and definitions into normal links and images", | ||
@@ -30,3 +30,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"mdast-util-definitions": "^2.0.0", | ||
"mdast-util-definitions": "^4.0.0", | ||
"unist-util-visit": "^2.0.0" | ||
@@ -41,11 +41,11 @@ }, | ||
"prettier": "^2.0.0", | ||
"remark": "^11.0.0", | ||
"remark-cli": "^7.0.0", | ||
"remark-preset-wooorm": "^6.0.0", | ||
"tape": "^4.0.0", | ||
"tinyify": "^2.0.0", | ||
"xo": "^0.28.0" | ||
"remark": "^13.0.0-alpha.0", | ||
"remark-cli": "^8.0.0", | ||
"remark-preset-wooorm": "^7.0.0", | ||
"tape": "^5.0.0", | ||
"tinyify": "^3.0.0", | ||
"xo": "^0.33.0" | ||
}, | ||
"scripts": { | ||
"format": "remark . -qfo && prettier --write \"**/*.js\" && xo --fix", | ||
"format": "remark . -qfo && prettier . --write && xo --fix", | ||
"build-bundle": "browserify . -s remarkInlineLinks > remark-inline-links.js", | ||
@@ -52,0 +52,0 @@ "build-mangle": "browserify . -s remarkInlineLinks -p tinyify > remark-inline-links.min.js", |
@@ -14,2 +14,9 @@ # remark-inline-links | ||
## Note! | ||
This plugin is ready for the new parser in remark | ||
([`remarkjs/remark#536`](https://github.com/remarkjs/remark/pull/536)). | ||
The current and previous versions of the plugin work with the current and | ||
previous versions of remark. | ||
## Install | ||
@@ -60,15 +67,6 @@ | ||
### `remark().use(inlineLinks[, options])` | ||
### `remark().use(inlineLinks)` | ||
Plugin to transform references and definitions into normal links and images. | ||
##### `options` | ||
###### `options.commonmark` | ||
Handle definitions as CommonMark (`boolean`, default: `false`). | ||
The default behavior is to prefer the last found duplicate definition. | ||
Turn on to use CommonMark handling of duplicate definitions: use the first | ||
definition, ignore duplicate definitions. | ||
## Security | ||
@@ -109,3 +107,3 @@ | ||
[build-badge]: https://img.shields.io/travis/remarkjs/remark-inline-links/master.svg | ||
[build-badge]: https://img.shields.io/travis/remarkjs/remark-inline-links/main.svg | ||
@@ -132,5 +130,5 @@ [build]: https://travis-ci.org/remarkjs/remark-inline-links | ||
[chat-badge]: https://img.shields.io/badge/chat-spectrum-7b16ff.svg | ||
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg | ||
[chat]: https://spectrum.chat/unified/remark | ||
[chat]: https://github.com/remarkjs/remark/discussions | ||
@@ -141,7 +139,7 @@ [npm]: https://docs.npmjs.com/cli/install | ||
[contributing]: https://github.com/remarkjs/.github/blob/master/contributing.md | ||
[contributing]: https://github.com/remarkjs/.github/blob/HEAD/contributing.md | ||
[support]: https://github.com/remarkjs/.github/blob/master/support.md | ||
[support]: https://github.com/remarkjs/.github/blob/HEAD/support.md | ||
[coc]: https://github.com/remarkjs/.github/blob/master/code-of-conduct.md | ||
[coc]: https://github.com/remarkjs/.github/blob/HEAD/code-of-conduct.md | ||
@@ -148,0 +146,0 @@ [license]: license |
39
8620
152
+ Addedmdast-util-definitions@4.0.0(transitive)
- Removedmdast-util-definitions@2.0.1(transitive)