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

remark-deflist

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-deflist

Remark plugin for pandoc-style definition lists.

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.1K
Maintainers
1
Weekly downloads
 
Created
Source

remark-deflist

Remark plugin for adding support for pandoc-style definition lists to Markdown.

Adds three new node types to MDAST: descriptionlist, descriptionterm, and descriptiondetails. When using rehype, these will be stringified as dl, dt, and dd respectively.

Multi-line definitions are not supported.

Syntax

Term 1

: Definition 1

AST

The example above will yield:

{
  type: 'descriptionlist',
  children: [
    {
      type: 'descriptionterm',
      children: [{
        type: 'text',
        value: 'Term 1'
      }]
    },
    {
      type: 'descriptiondetails',
      children: [{
        type: 'text',
        value: 'Definition 1'
      }]
    }
  ]
}

Installation

npm install --save remark-deflist

Usage

import unified from 'unified'
import markdown from 'remark-parse'
import html from 'rehype-stringify'
import remark2rehype from 'remark-rehype'
import deflist from 'remark-deflist'

unified()
  .use(markdown)
  .use(deflist)
  .use(remark2rehype)
  .use(html)

License

MIT © Alex Shaw

Keywords

FAQs

Package last updated on 08 Apr 2019

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