Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rehype-autolink-headings

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rehype-autolink-headings - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

15

package.json
{
"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"
]
}
}

32

readme.md

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc