Socket
Socket
Sign inDemoInstall

markdown-it-highlightjs

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-it-highlightjs

Preset to use highlight.js with markdown-it.


Version published
Weekly downloads
17K
decreased by-16.73%
Maintainers
1
Weekly downloads
 
Created
Source

markdown-it-highlightjs npm version

Preset to use highlight.js with markdown-it.

Usage

const md = require('markdown-it')()
  .use(require('markdown-it-highlightjs'), opts)

// All code blocks will be highlighted.

The opts object can contain:

NameTypeDescriptionDefault
autobooleanWhether to automatically detect language if not specified.true
codebooleanWhether to add the hljs class to raw code blocks (not fenced blocks).true
registerobjectRegister other languages which are not included in the standard pack.null

Register languages

const md = require('markdown-it')()
  .use(require('markdown-it-highlightjs'), {
    register: {
      cypher: require('highlightjs-cypher')
    }
  })

Keywords

FAQs

Package last updated on 05 Mar 2020

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