# pulldown-cmark/pulldown-cmark

**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/pulldown-cmark-pulldown-cmark).**

2,610 stars · 288 forks · Rust · MIT

## Links

- GitHub: https://github.com/pulldown-cmark/pulldown-cmark
- Homepage: https://pulldown-cmark.github.io/pulldown-cmark
- awesome-repositories: https://awesome-repositories.com/repository/pulldown-cmark-pulldown-cmark.md

## Topics

`commonmark` `markdown` `parser` `rust`

## Description

pulldown-cmark is a pull-parsing library that transforms Markdown text into a stream of events based on the CommonMark specification. It functions as an event-based processor that represents document structure as an iterator of events rather than a concrete syntax tree, serving as both a parser and a renderer to convert Markdown into HTML strings.

The library is designed for memory efficiency by processing text as a stream to minimize resource usage. It supports programmatic document transformation, allowing users to map or filter the event stream before final rendering.

The project includes capabilities for tracking source offsets to link rendered output back to original byte ranges. It also supports extended Markdown syntax, providing the ability to parse and process non-standard elements such as tables and task lists.

## Tags

### Content Management & Publishing

- [CommonMark Compliant Parsers](https://awesome-repositories.com/f/content-management-publishing/commonmark-compliant-parsers.md) — Implements a pull-parsing library that strictly adheres to the CommonMark specification for consistent markdown processing.
- [Markdown to HTML Converters](https://awesome-repositories.com/f/content-management-publishing/markdown-to-html-converters.md) — Converts parsed Markdown events into HTML strings for web browser display. ([source](https://cdn.jsdelivr.net/gh/pulldown-cmark/pulldown-cmark@main/README.md))
- [Markdown Processors](https://awesome-repositories.com/f/content-management-publishing/content-processing-transformation/markdown-markup-tools/markdown-processors.md) — Processes Markdown text as a stream of events to transform lightweight markup into structured document types.
- [Markdown Parsing Pipelines](https://awesome-repositories.com/f/content-management-publishing/markdown-parsing-pipelines.md) — Provides a pull-parsing pipeline to convert Markdown text into a structured event stream. ([source](https://pulldown-cmark.github.io/pulldown-cmark))
- [Event-Based Converters](https://awesome-repositories.com/f/content-management-publishing/markdown-to-document-converters/event-based-converters.md) — Transforms Markdown text into a stream of iterator-based events for rendering or modification. ([source](https://cdn.jsdelivr.net/gh/pulldown-cmark/pulldown-cmark@main/README.md))
- [Markdown Extensions](https://awesome-repositories.com/f/content-management-publishing/content-management-systems/content-authoring-tools/markdown-based-content-authoring/markdown-based-content-authoring/markdown-extensions.md) — Extends standard CommonMark with support for custom elements like tables and task lists.
- [Document Transformation Pipelines](https://awesome-repositories.com/f/content-management-publishing/content-processing-transformation/document-transformation-pipelines.md) — Provides a framework for programmatically filtering and transforming the event stream before final rendering.
- [Pull Parsers](https://awesome-repositories.com/f/content-management-publishing/markdown-parsing-pipelines/pull-parsers.md) — Provides a memory-efficient pull-parsing architecture that processes text as a stream to reduce resource usage.

### Data & Databases

- [Structural Event Streaming](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/stream-processing-systems/data-streaming/structured-event-streams/structural-event-streaming.md) — Uses a pull-parsing approach to stream documents as a sequence of structural events, minimizing memory usage.
- [Event-Based Stream Processing](https://awesome-repositories.com/f/data-databases/event-based-stream-processing.md) — Processes Markdown as an event stream to ensure low memory overhead and high speed.
- [Iterable Transformation Utilities](https://awesome-repositories.com/f/data-databases/collection-iterators/asynchronous-iterators/iterator-transformation-helpers/iterable-transformation-utilities.md) — Provides functional iterator combinators to map or filter the stream of parsed Markdown events.
- [Source Tracking](https://awesome-repositories.com/f/data-databases/data-ingestion-sources/source-metadata-capture/source-tracking.md) — Identifies the original byte ranges for each parsed event to enable accurate source mapping. ([source](https://cdn.jsdelivr.net/gh/pulldown-cmark/pulldown-cmark@main/README.md))

### Development Tools & Productivity

- [Event-to-Source Mapping](https://awesome-repositories.com/f/development-tools-productivity/source-map-generators/event-to-source-mapping.md) — Tracks the original byte offsets of parsed Markdown elements to link output back to source text.

### Software Engineering & Architecture

- [Event-to-State Transformations](https://awesome-repositories.com/f/software-engineering-architecture/event-to-state-transformations.md) — Allows users to apply custom logic to the Markdown event stream via iterator combinators. ([source](https://cdn.jsdelivr.net/gh/pulldown-cmark/pulldown-cmark@main/README.md))
- [Single-Pass Tokenizers](https://awesome-repositories.com/f/software-engineering-architecture/stateless-architectures/stateless-token-validation/stateless-tokenizers/single-pass-tokenizers.md) — Employs a single-pass linear parsing strategy to identify Markdown structures efficiently.
- [Offset Tracking](https://awesome-repositories.com/f/software-engineering-architecture/string-validation-and-normalization/speech-to-text-normalizers/custom-text-normalizers/offset-tracking.md) — Maintains byte range offsets during parsing to map rendered output back to original source positions.
- [Syntax Parsing Engines](https://awesome-repositories.com/f/software-engineering-architecture/syntax-parsing-engines.md) — Implements parsing logic for non-standard Markdown features like footnotes and flavored tables. ([source](https://cdn.jsdelivr.net/gh/pulldown-cmark/pulldown-cmark@main/README.md))

### User Interface & Experience

- [Event-Driven Renderers](https://awesome-repositories.com/f/user-interface-experience/html-content-processing/code-to-html-rendering/event-driven-renderers.md) — Implements an event-driven rendering process to convert structural Markdown events into HTML strings.
- [Syntax Extensions](https://awesome-repositories.com/f/user-interface-experience/markdown-and-syntax-highlighting/syntax-extensions.md) — Supports extended Markdown syntax including tables and task lists. ([source](https://pulldown-cmark.github.io/pulldown-cmark))
