New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

markdown-it-toc-and-anchor

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-it-toc-and-anchor

markdown-it plugin to add toc and anchor links in headings

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

markdown-it-toc-and-anchor Travis Build Status

markdown-it plugin to add toc and anchor links in headings

Installation

$ npm install markdown-it-toc-and-anchor

Usage

import markdownIt from "markdown-it"
import markdownItTocAndAnchor from "markdown-it-toc-and-anchor"

markdownIt({
    html: true,
    linkify: true,
    typography: true,
  })
    .use(markdownItTocAndAnchor, {
      // ...options
    })
    .render(md)

Options

toc

(default: true)

Allow you to enable/disable the toc transformation of @[toc]

tocClassName

(default: "markdownIt-TOC")

Option to customize html class of the <ul> wrapping the toc

tocFirstLevel

(default: 1)

Allow you to skip some heading level. Example: use 2 if you want to skip <h1> from the TOC.

(default: true)

Allow you to enable/disable the anchor link in the headings

anchorLinkSymbol

(default: "#")

Allow you to customize the anchor link symbol

anchorLinkBefore

(default: true)

Allow you to prepend/append the anchor link in the headings

anchorClassName

(default: "markdownIt-Anchor")

Allow you to customize the anchor link class

resetIds

(default: true)

Allow you to reset (or not) ids incrementation. Use it if you will have multiple documents on the same page.

indentation

(default: " ")

Allow you to customize indentation


Changelog

License

Keywords

FAQs

Package last updated on 03 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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