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

markdown-it-ignore

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-it-ignore

Ignore plugin for markdown-it markdown parser.

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

markdown-it-ignore

NPM version

Ignore plugin for markdown-it markdown parser.

Installation

npm i markdown-it-ignore

Configuration

var md = require('markdown-it')();
var mii = require('markdown-it-ignore');
md.use(mii [, options]);

Options:

  • secure (type: boolean, default: true): Secure HTML output

Differences in browser. If you load the script directly into the page without using a package system, the module will add itself globally with the name markdownitIgnore. Init code will look a bit different in this case:

var md = window.markdownit().use(window.markdownitIgnore);

Usage

Default

In your markdown you can use ::: as block separator to not parse what is inside.

It is similar to the fence block, but no <pre> nor <code> tags are added.

Example:

*This will be parsed*

:::
*This won't be parsed*
:::

Output:

<p><strong>This will be parsed</strong></p>
*This won't be parsed*

Unsecure

If you want to insert HTML inside the ignore block, set the secure option to false (else HTML characters are escaped).

Example:

:::
<div>This will preserved as is</div>
:::

Output:

<div>This will preserved as is</div>

Keywords

FAQs

Package last updated on 06 May 2022

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