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

remark-comments

Package Overview
Dependencies
Maintainers
2
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-comments

This plugin parses custom Markdown syntax for Markdown source comments.

  • 1.2.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.8K
decreased by-37.32%
Maintainers
2
Weekly downloads
 
Created
Source

remark-comments Build Status Coverage Status

This plugin parses custom Markdown syntax for Markdown source comments.

Syntax

You can insert comments in the Markdown source this way:

Foo<--COMMENTS I am a comment COMMENTS-->bar

Everything between <--COMMENTS and COMMENTS--> will be absent from the HTML output. Compiling to Markdown will preserve all comments.

Installation

npm:

npm install remark-comments

Configuration

Two options can be passed, as a single argument object:

{beginMarker = 'COMMENTS', endMarker = 'COMMENTS'}

Therefore, invoking this plugin this way:

  .use(remarkComments, {
    beginMarker: 'foo',
    endMarker: 'bar'
  })

will make this plugin remove what's put between <--foo and bar-->.

Usage

Dependencies:

const unified = require('unified')
const remarkParse = require('remark-parse')
const stringify = require('rehype-stringify')
const remark2rehype = require('remark-rehype')

const remarkComments = require('remark-comments')

Usage:

unified()
  .use(remarkParse)
  .use(remarkComments)
  .use(remark2rehype)
  .use(stringify)

License

MIT © Zeste de Savoir

Keywords

FAQs

Package last updated on 23 Nov 2018

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