# syntax-tree/mdast

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/syntax-tree-mdast).**

1,441 stars · 48 forks

## Links

- GitHub: https://github.com/syntax-tree/mdast
- Homepage: https://unifiedjs.com
- awesome-repositories: https://awesome-repositories.com/repository/syntax-tree-mdast.md

## Topics

`ast` `markdown` `syntax-tree` `unist`

## Description

The project provides a standardized abstract syntax tree specification and utility library for parsing, transforming, and serializing markdown documents. It serves as a comprehensive document processing architecture that translates between raw text markup and structured node representations in both directions.

The capability surface covers syntax parsing for extended markdown features, custom syntax extensions, metadata blocks, and embedded expressions, alongside document serialization that converts syntax trees back into standard and extended markup formats. It includes node modeling and validation primitives that define document structures, component tags, and recursive tree integrity, supported by content manipulation tools for extracting sections, resolving definitions, and transforming trees.

## Tags

### Content Management & Publishing

- [Markdown Parsers](https://awesome-repositories.com/f/content-management-publishing/content-processing-transformation/markdown-markup-tools/markdown-processors/markdown-parsers.md) — Parses markdown text into structured abstract syntax trees and serializes trees back into standard markup.
- [Document Parsers](https://awesome-repositories.com/f/content-management-publishing/markdown-parsing-pipelines/markdown-ast-parsing/document-parsers.md) — Converts raw markdown text into structured abstract syntax tree nodes programmatically so documents can be analyzed and manipulated. ([source](https://github.com/syntax-tree/mdast-util-from-markdown))
- [Markdown Abstract Syntax Trees](https://awesome-repositories.com/f/content-management-publishing/content-processing-transformation/document-processing-conversion/document-processing/format-specific-parsers/markdown-abstract-syntax-trees.md) — Defines a structured node format representing markdown documents as abstract syntax trees to parse and manipulate content programmatically. ([source](https://github.com/syntax-tree/mdast#readme))
- [HTML Tree Converters](https://awesome-repositories.com/f/content-management-publishing/content-processing-transformation/document-processing-conversion/document-processing/format-specific-parsers/markdown-abstract-syntax-trees/html-tree-converters.md) — Converts markdown abstract syntax trees into corresponding HTML abstract syntax trees to bridge text markup and web-ready document structures. ([source](https://github.com/syntax-tree/mdast-util-to-hast))
- [Tree-to-Text Serializers](https://awesome-repositories.com/f/content-management-publishing/content-processing-transformation/document-processing-conversion/document-processing/format-specific-parsers/markdown-abstract-syntax-trees/tree-to-text-serializers.md) — Converts syntax trees containing embedded expressions and component syntax back into serialized markdown documents. ([source](https://github.com/syntax-tree/mdast-util-mdx))
- [Extended Syntax Renderers](https://awesome-repositories.com/f/content-management-publishing/content-processing-transformation/markdown-markup-tools/markdown-tools/markdown-renderers/multi-syntax-renderers/technical-extended-syntax/extended-syntax-renderers.md) — Reconstructs markdown documents from abstract syntax trees, outputting extended features like tables and footnotes. ([source](https://github.com/syntax-tree/mdast-util-gfm))
- [Plain Text Extraction](https://awesome-repositories.com/f/content-management-publishing/plain-text-persistence/document-text-extractors/plain-text-extraction.md) — Retrieves plain text from markdown nodes, lists, or arrays by reading text fields or serializing children. ([source](https://github.com/syntax-tree/mdast-util-to-string))
- [Section Content Extractors](https://awesome-repositories.com/f/content-management-publishing/content-management-systems/content-architecture-modeling/document-models/document-sectioning/document-content-structuring/flat-heading-hierarchies/heading-hierarchies/section-content-extractors.md) — Locates a specific heading within a document structure and isolates its section content up to the next heading. ([source](https://github.com/syntax-tree/mdast-util-heading-range))
- [Markdown HTML Conversions](https://awesome-repositories.com/f/content-management-publishing/content-processing-transformation/document-processing-conversion/document-processing-tools/markup-and-structure-parsers/html-document-transformation/markdown-html-conversions.md) — Translates markdown syntax trees into HTML elements or natural language structures for browser rendering and downstream processing.
- [Secure Markdown Rendering](https://awesome-repositories.com/f/content-management-publishing/markdown-to-html-converters/secure-markdown-rendering.md) — Processes raw HTML within markdown content while sanitizing untrusted inputs or managing dangerous markup flags to prevent security vulnerabilities. ([source](https://github.com/syntax-tree/mdast-util-to-hast))
- [Component Tag Node Representations](https://awesome-repositories.com/f/content-management-publishing/metadata-tagging/tag-based-metadata-mapping/component-injection-tags/component-tag-node-representations.md) — Models inline and block-level component tags, including fragments, names, and attributes, as structured nodes within document trees. ([source](https://github.com/syntax-tree/mdast-util-mdx-jsx))

### Software Engineering & Architecture

- [Abstract Syntax Tree Generators](https://awesome-repositories.com/f/software-engineering-architecture/abstract-syntax-tree-parsing/abstract-syntax-tree-generators.md) — Navigates, filters, cleans, and transforms document syntax trees to restructure content or extract specific sections.
- [Abstract Syntax Tree Specifications](https://awesome-repositories.com/f/software-engineering-architecture/abstract-syntax-tree-specifications.md) — Represents document structure using standardized node types and interfaces to enable consistent programmatic parsing.
- [Markup Representations](https://awesome-repositories.com/f/software-engineering-architecture/markup-representations.md) — Provides bidirectional conversion between raw text markup and structured abstract syntax tree representations.
- [Markdown AST Manipulation](https://awesome-repositories.com/f/software-engineering-architecture/trees/syntax-tree-construction/markdown-ast-manipulation.md) — Parses markdown text into structured nodes and serializes trees back into markup for programmatic document manipulation. ([source](https://github.com/syntax-tree/mdast/blob/main/readme.md))
- [Markdown Node Querying and Modification](https://awesome-repositories.com/f/software-engineering-architecture/trees/syntax-tree-construction/markdown-ast-manipulation/markdown-node-querying-and-modification.md) — Offers a complete toolset for traversing, querying, modifying, and validating nodes within markdown abstract syntax trees.
- [Markdown Document Tree Validators](https://awesome-repositories.com/f/software-engineering-architecture/syntax-parsing-engines/incremental-syntax-tree-updaters/tree-sitter-parsers/structural-node-validation/markdown-document-tree-validators.md) — Checks that a document tree conforms to structural rules and recursively verifies all nested children down the line. ([source](https://github.com/syntax-tree/mdast-util-assert))
- [Component Syntax Processors](https://awesome-repositories.com/f/software-engineering-architecture/trees/syntax-tree-construction/syntax-tree-transformers/component-syntax-processors.md) — Transforms XML-like component syntax within documents into syntax tree nodes and serializes those trees back into markup. ([source](https://github.com/syntax-tree/mdast-util-mdx-jsx))

### Data & Databases

- [Document Tree Transformation Pipelines](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/data-transformation/payload-converters/pluggable-transformation-pipelines/document-tree-transformation-pipelines.md) — Applies sequential handler functions and plugins to transform document trees into different formats or target syntax trees.
- [Visitor Pattern Traversers](https://awesome-repositories.com/f/data-databases/visitor-pattern-traversers.md) — Traverses hierarchical document trees recursively to inspect, validate, and transform specific node types.
- [Syntax Extension Serializers](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/data-serialization/json-serializers/markdown-serializers/syntax-extension-serializers.md) — Integrates additional syntax plugins to serialize specialized constructs like tables, math, and frontmatter into valid markdown. ([source](https://github.com/syntax-tree/mdast-util-to-markdown))

### Development Tools & Productivity

- [Text](https://awesome-repositories.com/f/development-tools-productivity/ast-transformation-tools/ast-node-generation/node-replacements/text.md) — Scans document text nodes in preorder to locate patterns and replace them with generated nodes. ([source](https://github.com/syntax-tree/mdast-util-find-and-replace))
- [Automatic Table of Contents](https://awesome-repositories.com/f/development-tools-productivity/documentation-navigation/document-structure-navigators/outline-management/automatic-table-of-contents.md) — Builds a nested list of document headings from a syntax tree and generates navigation anchor links. ([source](https://github.com/syntax-tree/mdast-util-toc))

### Web Development

- [Markdown Parser Extensions](https://awesome-repositories.com/f/web-development/web-standards/typography-systems/inline-text-styles/markdown-parser-extensions.md) — Builds custom parsers and plugins to support non-standard markdown features like frontmatter, math, and tables. ([source](https://github.com/syntax-tree/mdast-util-from-markdown))

### Part of an Awesome List

- [Document Frontmatter Parsers](https://awesome-repositories.com/f/awesome-lists/data/document-parsing/document-frontmatter-parsers.md) — Converts embedded metadata blocks at the start of documents into structured nodes during parsing by using configurable syntax extensions. ([source](https://github.com/syntax-tree/mdast-util-frontmatter))

### Programming Languages & Runtimes

- [Markup Syntax Extensions](https://awesome-repositories.com/f/programming-languages-runtimes/embedded-syntax-support/markup-syntax-extensions.md) — Supports pluggable parser and serializer extensions for custom syntax nodes and non-standard markdown features.
- [Module Import and Export Processors](https://awesome-repositories.com/f/programming-languages-runtimes/module-export-and-import-systems/module-import-and-export-processors.md) — Transforms embeddable module import and export syntax between raw markdown text and abstract syntax tree nodes in both directions. ([source](https://github.com/syntax-tree/mdast-util-mdxjs-esm))
- [Custom Markdown](https://awesome-repositories.com/f/programming-languages-runtimes/syntax-extensions/custom-markdown.md) — Builds extensions that plug into parsers and serializers to support custom syntax nodes within documents. ([source](https://github.com/syntax-tree/mdast-util-mdx-expression))

### Testing & Quality Assurance

- [Embedded Expression Parsers](https://awesome-repositories.com/f/testing-quality-assurance/static-code-analysis/ast-extraction/static-analysis-ast-parsing/expression-parsing/embedded-expression-parsers.md) — Parses embedded expressions, JSX elements, and module imports within markdown documents into structured syntax tree nodes. ([source](https://github.com/syntax-tree/mdast-util-mdx))

### User Interface & Experience

- [Markdown Directive Nodes](https://awesome-repositories.com/f/user-interface-experience/programmatic-element-editing/internal-node-representations/markdown-directive-nodes.md) — Structures markdown text containers and text elements with names, attributes, and content into standardized syntax tree nodes. ([source](https://github.com/syntax-tree/mdast-util-directive))
