rehype-autolink-headings
Advanced tools
Comparing version 2.0.0 to 2.0.1
{ | ||
"name": "rehype-autolink-headings", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Add links to headings in HTML", | ||
@@ -34,9 +34,9 @@ "license": "MIT", | ||
"negate": "^1.0.0", | ||
"nyc": "^10.0.0", | ||
"rehype": "^4.0.0", | ||
"nyc": "^11.0.0", | ||
"rehype": "^5.0.0", | ||
"remark-cli": "^3.0.0", | ||
"remark-preset-wooorm": "^2.0.0", | ||
"remark-preset-wooorm": "^3.0.0", | ||
"tape": "^4.0.0", | ||
"to-vfile": "^2.1.1", | ||
"xo": "^0.17.0" | ||
"xo": "^0.18.0" | ||
}, | ||
@@ -61,2 +61,3 @@ "scripts": { | ||
"space": true, | ||
"esnext": false, | ||
"ignores": [ | ||
@@ -67,4 +68,6 @@ "rehype-autolink-headings.js" | ||
"remarkConfig": { | ||
"plugins": ["preset-wooorm"] | ||
"plugins": [ | ||
"preset-wooorm" | ||
] | ||
} | ||
} |
@@ -61,19 +61,25 @@ # rehype-autolink-headings [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] | ||
###### `options` | ||
##### `options` | ||
* `behavior` (`string`, default: `prepend`) | ||
— How to add a link: | ||
* `'prepend'` and `'append'` inserts a link with `content` | ||
in it respectively before or after the heading contents; | ||
* `'wrap'` wraps a link around the current heading contents. | ||
* `properties` (`Object`, default: `{}` if `'wrap'`, | ||
`{ariaHidden: true}` otherwise) | ||
— Properties for the added link; | ||
* `content` (`Node` or `Array.<Node>`, default: a `span` element | ||
with `icon` and `icon-link` classes) | ||
— Content to add in link. Ignored if `'wrap'`. | ||
###### `options.behavior` | ||
`string`, default: `prepend` — How to add a link: | ||
* `'prepend'` and `'append'` inserts a link with `content` | ||
in it respectively before or after the heading contents | ||
* `'wrap'` wraps a link around the current heading contents. | ||
###### `options.properties` | ||
`Object`, default: `{}` if `'wrap'`, `{ariaHidden: true}` otherwise | ||
— Properties for the added link. | ||
###### `options.content` | ||
`Node` or `Array.<Node>`, default: a `span` element with `icon` and `icon-link` | ||
classes — Content to add in link. Ignored if `'wrap'` | ||
## Related | ||
* [**rehype-slug**](https://github.com/wooorm/rehype-slug). | ||
* [`rehype-slug`](https://github.com/wooorm/rehype-slug) | ||
@@ -80,0 +86,0 @@ ## License |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7246
106