Socket
Socket
Sign inDemoInstall

markdown-it-deflist

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-it-deflist

<dl> tag for markdown-it markdown parser.


Version published
Weekly downloads
187K
increased by0.26%
Maintainers
1
Weekly downloads
 
Created

What is markdown-it-deflist?

The markdown-it-deflist package is a plugin for the markdown-it Markdown parser that adds support for definition lists. Definition lists are a type of list where each term is followed by its definition, which is useful for creating glossaries, dictionaries, or any other content that requires term-definition pairs.

What are markdown-it-deflist's main functionalities?

Basic Definition List

This feature allows you to create a basic definition list. The code sample demonstrates how to use the markdown-it-deflist plugin to parse a simple definition list with two terms and their corresponding definitions.

const md = require('markdown-it')().use(require('markdown-it-deflist'));
const result = md.render('Term 1\n: Definition 1\n\nTerm 2\n: Definition 2');
console.log(result);

Multi-line Definitions

This feature supports multi-line definitions, allowing definitions to span multiple lines. The code sample shows how to create a definition list where the definition of 'Term 1' continues on the next line.

const md = require('markdown-it')().use(require('markdown-it-deflist'));
const result = md.render('Term 1\n: Definition 1\n  continues on the next line\n\nTerm 2\n: Definition 2');
console.log(result);

Nested Definition Lists

This feature allows for nested definition lists, where a definition can contain another term-definition pair. The code sample demonstrates how to create a nested definition list.

const md = require('markdown-it')().use(require('markdown-it-deflist'));
const result = md.render('Term 1\n: Definition 1\n  : Sub-definition 1\n\nTerm 2\n: Definition 2');
console.log(result);

Other packages similar to markdown-it-deflist

Keywords

FAQs

Package last updated on 05 Oct 2015

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