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

markdown-it-named-headings

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-it-named-headings

Add IDs to heading elements in markdown-it

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.7K
increased by0.94%
Maintainers
1
Weekly downloads
 
Created
Source

markdown-it-named-headings

Add IDs to heading elements in markdown-it

A plugin for markdown-it to add id attributes to h1...h6 elements.

md.render('# Example Header') 
=> '<h1 id="example-header">Example</h1>'

Status

Install

npm install --save markdown-it-named-headings

Usage

var md = require('markdown-it')()
  .use(require('markdown-it-named-headings'))

md.render('# hello')

Prior art

This works exactly like markdown-it-named-headers, except this plugin operates on the token level, not the renderer. The result is that it can be chained with other markdown-it plugins that would want to have access to the ID.

Thanks

markdown-it-named-headings © 2016+, Rico Sta. Cruz. Released under the MIT License.
Authored and maintained by Rico Sta. Cruz with help from contributors (list).

ricostacruz.com  ·  GitHub @rstacruz  ·  Twitter @rstacruz

Keywords

FAQs

Package last updated on 19 Apr 2016

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