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

markdown-it

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-it

Markdown-it - modern pluggable markdown parser.

  • 8.4.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7.5M
increased by8.7%
Maintainers
1
Weekly downloads
 
Created

What is markdown-it?

The markdown-it npm package is a Markdown parser that can convert Markdown text into HTML. It is highly extensible and supports various plugins to enhance its functionality. It is commonly used to render user-generated content in web applications, documentation tools, and content management systems.

What are markdown-it's main functionalities?

Basic Markdown Parsing

This feature allows you to convert basic Markdown text into HTML. The code sample demonstrates how to create a new instance of MarkdownIt and use it to render a simple Markdown string.

const MarkdownIt = require('markdown-it');
const md = new MarkdownIt();
const result = md.render('# Markdown-it rulezz!');

HTML Output Customization

Markdown-it allows customization of the HTML output through options. The code sample shows how to enable HTML tags in source, automatically convert URLs to links, and use typographic replacements.

const MarkdownIt = require('markdown-it');
const md = new MarkdownIt({
  html: true,
  linkify: true,
  typographer: true
});

Syntax Extensions with Plugins

Markdown-it supports plugins to extend its syntax. The code sample demonstrates how to add emoji support to the Markdown parser using the markdown-it-emoji plugin.

const MarkdownIt = require('markdown-it');
const emojiPlugin = require('markdown-it-emoji');
const md = new MarkdownIt();
md.use(emojiPlugin);
const result = md.render('Hello :smile:');

Linkify

The linkify feature automatically detects URLs in the text and converts them into clickable links. The code sample shows how to enable this feature in the MarkdownIt instance.

const MarkdownIt = require('markdown-it');
const md = new MarkdownIt({
  linkify: true
});
const result = md.render('Visit https://www.example.com');

Other packages similar to markdown-it

Keywords

FAQs

Package last updated on 17 Jul 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