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

mdast-util-from-markdown

Package Overview
Dependencies
Maintainers
2
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mdast-util-from-markdown

mdast utility to parse markdown

  • 2.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9.2M
increased by5.26%
Maintainers
2
Weekly downloads
 
Created

What is mdast-util-from-markdown?

The mdast-util-from-markdown package is a utility to parse Markdown and convert it into a Markdown Abstract Syntax Tree (MDAST). It allows developers to work with the tree structure to manipulate, inspect, or transform Markdown content programmatically.

What are mdast-util-from-markdown's main functionalities?

Parsing Markdown to MDAST

This feature allows you to parse a Markdown string and produce an MDAST. The MDAST can then be manipulated or inspected as needed.

import { fromMarkdown } from 'mdast-util-from-markdown';
const mdast = fromMarkdown('# Hello world');

Using plugins to extend parsing capabilities

This feature enables the use of plugins to extend the parsing capabilities of the utility. For example, using the 'micromark-extension-gfm' plugin to support GitHub Flavored Markdown (GFM) features like task lists.

import { fromMarkdown } from 'mdast-util-from-markdown';
import gfm from 'micromark-extension-gfm';
const mdast = fromMarkdown('# Hello world\n\n- [ ] task list item', {extensions: [gfm()]});

Other packages similar to mdast-util-from-markdown

Keywords

FAQs

Package last updated on 25 Oct 2024

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