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 1.0.0 to 2.0.0

6

index.js
'use strict';
/* Dependencies. */
var xtend = require('xtend');

@@ -9,6 +8,4 @@ var visit = require('unist-util-visit');

/* Expose. */
module.exports = autolink;
/* Constants. */
var headings = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];

@@ -22,4 +19,3 @@ var methods = {prepend: 'unshift', append: 'push'};

/* Attacher - Add links to headings. */
function autolink(processor, options) {
function autolink(options) {
var settings = options || {};

@@ -26,0 +22,0 @@ var props = settings.properties;

17

package.json
{
"name": "rehype-autolink-headings",
"version": "1.0.0",
"version": "2.0.0",
"description": "Add links to headings in HTML",

@@ -30,10 +30,10 @@ "license": "MIT",

"bail": "^1.0.1",
"browserify": "^13.0.0",
"browserify": "^14.1.0",
"esmangle": "^1.0.0",
"is-hidden": "^1.0.1",
"negate": "^1.0.0",
"nyc": "^8.3.1",
"rehype": "^3.0.0",
"remark-cli": "^2.0.0",
"remark-preset-wooorm": "^1.0.0",
"nyc": "^10.0.0",
"rehype": "^4.0.0",
"remark-cli": "^3.0.0",
"remark-preset-wooorm": "^2.0.0",
"tape": "^4.0.0",

@@ -44,3 +44,3 @@ "to-vfile": "^2.1.1",

"scripts": {
"build-md": "remark . --quiet --frail",
"build-md": "remark . -qfo",
"build-bundle": "browserify index.js --bare -s rehypeAutolinkHeadings > rehype-autolink-headings.js",

@@ -67,5 +67,4 @@ "build-mangle": "esmangle rehype-autolink-headings.js > rehype-autolink-headings.min.js",

"remarkConfig": {
"output": true,
"presets": "wooorm"
"plugins": ["preset-wooorm"]
}
}

@@ -35,6 +35,10 @@ # rehype-autolink-headings [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]

rehype().use(slug).use(link).process(doc, {fragment: true}, function (err, file) {
if (err) throw err;
console.log(String(file));
});
rehype()
.data('settings', {fragment: true})
.use(slug)
.use(link)
.process(doc, function (err, file) {
if (err) throw err;
console.log(String(file));
});
```

@@ -41,0 +45,0 @@

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