awesome-repositories.com
Blog
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectAboutHow we rankPressMCP server
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
commonmark avatar

commonmark/commonmark.js

0
View on GitHub↗
1,559 stars·222 forks·JavaScript·1 view

Commonmark.js

Commonmark.js is a library designed to parse and render text formatted according to the CommonMark specification. It functions as a document processing pipeline that converts plain text into structured HTML or an abstract syntax tree, enabling developers to programmatically inspect, modify, and transform document elements.

The library distinguishes itself through its strict adherence to standardized parsing rules, ensuring consistent and predictable output across different software environments. It provides a robust framework for document tree manipulation, allowing users to traverse, insert, remove, or reorder nodes before generating final markup. This capability is supported by a comprehensive set of utilities for handling complex nested structures, including blockquotes, lists, and link references.

Beyond its core parsing and rendering functions, the project includes command-line tools for automated document transformation and stream processing. These utilities facilitate batch processing of files and syntax validation, helping to maintain consistency in documentation workflows. The library is designed for use in both browser and server-side environments.

Features

  • Markdown to HTML Converters - Transforms markdown plaintext into structured HTML for consistent web display.
  • CommonMark Compliant Parsers - Implements a parser strictly compliant with the CommonMark specification.
  • Markdown Abstract Syntax Trees - Generates abstract syntax trees from input text to facilitate efficient document transformation.
  • Link and Image Parsers - Converts standard link and image syntax into corresponding HTML elements.
  • Markdown Parsing Pipelines - Converts markdown text into structured HTML by interpreting block-level elements and inline references.
  • Markdown Renderers - Provides a JavaScript-based renderer for transforming markdown into HTML in browser or server environments.
  • Markdown Specification Standards - Ensures strict adherence to official markdown specifications for predictable and consistent parsing.
  • Recursive Block Parsing - Implements recursive traversal to correctly handle nested markdown block structures like lists and blockquotes.
  • Token Stream Converters - Maintains stateful token streams to accurately resolve complex nested formatting rules during the parsing process.
  • Abstract Syntax Tree Parsing - Converts text into structured abstract syntax trees to enable programmatic inspection and modification.
  • Inline Code Parsers - Converts text enclosed in backticks into formatted code elements while handling nested delimiters.
  • Fenced Code Block Parsers - Parses text enclosed in backticks or tildes into structured code elements.
  • Emphasis Parsers - Converts standard syntax for italics and bold text into corresponding HTML emphasis and strong tags.
  • Nested Lists - Converts hierarchical bulleted and numbered lists into structured HTML elements while maintaining nesting depth.
  • List Parsers - Converts structured text lists into standard HTML list elements while maintaining proper grouping.
  • AST to HTML Renderers - Renders abstract syntax trees into structured HTML with configurable formatting and security options.
  • Command-Line Document Processors - Provides command-line utilities for automating document processing and batch conversion workflows.
  • Markdown Transformation Pipelines - Ships command-line tools for automated batch transformation of markdown files into web-ready documents.
  • Markdown Link Resolvers - The library identifies and resolves deeply nested or complex link syntax within text to ensure consistent conversion into valid markup elements.
  • Markdown Validations - Includes standardized test suites to validate markdown syntax adherence and ensure consistent output.
  • CLI Stream Processors - Supports standard input and output streaming for integration into command-line processing pipelines.
  • Tree Traversal - Provides visitor interfaces for programmatically traversing and modifying the document tree before final output.
  • Document Tree Mutations - Enables programmatic modification of document structures by allowing node traversal and manipulation.
  • Markup Formatting Engines - Provides configurable logic for mapping document content to specific markup styles and structural elements.

Star history

Star history chart for commonmark/commonmark.jsStar history chart for commonmark/commonmark.js

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Curated searches featuring Commonmark.js

Hand-picked collections where Commonmark.js appears.
  • JavaScript Markdown Libraries

Frequently asked questions

What does commonmark/commonmark.js do?

Commonmark.js is a library designed to parse and render text formatted according to the CommonMark specification. It functions as a document processing pipeline that converts plain text into structured HTML or an abstract syntax tree, enabling developers to programmatically inspect, modify, and transform document elements.

What are the main features of commonmark/commonmark.js?

The main features of commonmark/commonmark.js are: Markdown to HTML Converters, CommonMark Compliant Parsers, Markdown Abstract Syntax Trees, Link and Image Parsers, Markdown Parsing Pipelines, Markdown Renderers, Markdown Specification Standards, Recursive Block Parsing.

What are some open-source alternatives to commonmark/commonmark.js?

Open-source alternatives to commonmark/commonmark.js include: xoofx/markdig — Markdig is a markdown parser library that converts text into structured HTML, plain text, or other formats using a… lunet-io/markdig — Markdig is a high-performance Markdown processor for .NET applications that converts Markdown text into HTML or other… commonmark/commonmark-spec — This project is a formal markdown specification standard that provides a detailed markup syntax definition and a… vanessa219/vditor — Vditor is a browser-based Markdown editor and rendering engine that supports multiple editing interfaces, including a… pulldown-cmark/pulldown-cmark — pulldown-cmark is a pull-parsing library that transforms Markdown text into a stream of events based on the CommonMark… jonschlinkert/remarkable — Remarkable is an extensible Markdown parser library that implements the CommonMark specification and supports GitHub…

Open-source alternatives to Commonmark.js

Similar open-source projects, ranked by how many features they share with Commonmark.js.
  • xoofx/markdigxoofx avatar

    xoofx/markdig

    5,127View on GitHub↗

    Markdig is a markdown parser library that converts text into structured HTML, plain text, or other formats using a configurable pipeline. It functions as a CommonMark compliant parser and an abstract syntax tree generator that transforms markdown into a hierarchical tree of block and inline nodes with precise source location mapping. The project is distinguished by a decoupled renderer architecture that separates parsing logic from output generation, enabling the transformation of the syntax tree into non-HTML formats such as LaTeX or XAML. It also serves as a lossless markdown processor by t

    C#commonmarkcommonmark-parsingcsharp
    View on GitHub↗5,127
  • lunet-io/markdiglunet-io avatar

    lunet-io/markdig

    5,257View on GitHub↗

    Markdig is a high-performance Markdown processor for .NET applications that converts Markdown text into HTML or other target formats. It is a CommonMark compliant parser and extensible engine that can transform Markdown into a searchable and manipulatable abstract syntax tree. The library provides a framework for adding custom syntax and rendering logic through a modular pipeline of parsers and renderers. It supports native ahead-of-time compilation and trimming to minimize binary size. Capabilities include the generation of structured HTML with custom attributes and styling, the extraction

    C#
    View on GitHub↗5,257
  • commonmark/commonmark-speccommonmark avatar

    commonmark/commonmark-spec

    5,105View on GitHub↗

    This project is a formal markdown specification standard that provides a detailed markup syntax definition and a definitive set of rules for parsing plain text into consistent HTML output. It establishes a standardized grammar for structural blocks and inline elements to ensure uniform rendering across different software implementations. The specification is supported by a parser conformance suite and a reference implementation in C and JavaScript to verify that implementations adhere to the standard. It includes a system for implementation verification that compares transformed input strings

    Python
    View on GitHub↗5,105
  • vanessa219/vditorVanessa219 avatar

    Vanessa219/vditor

    11,074View on GitHub↗

    Vditor is a browser-based Markdown editor and rendering engine that supports multiple editing interfaces, including a visual rich-text experience, instant rendering, and a traditional side-by-side split-view preview. It serves as an authoring tool for technical documentation and a component for web-based editor integration. The project is distinguished by its support for complex technical content, utilizing specialized rendering for mathematical formulas, flowcharts, sequence diagrams, and mind maps. It also functions as a collaborative document review tool, enabling users to attach anchored

    TypeScriptcommonmarkeditorgfm
    View on GitHub↗11,074
  • See all 30 alternatives to Commonmark.js→