awesome-repositories.com
Blog
MCP
awesome-repositories.com

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

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

commonmark/commonmark-spec

0
View on GitHub↗
5,105 stars·354 forks·Python·24 viewscommonmark.org↗

Commonmark Spec

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 against expected HTML output and allows for the export of specification test data into JSON format.

The standard covers a wide range of content structuring and formatting capabilities, including headers, lists, block quotes, and horizontal rules. It defines mechanisms for code representation via fenced or indented blocks, HTML integration, and a reference-based system for managing hyperlinks and images.

The specification also details a two-phase parsing model that utilizes abstract syntax tree representation and Unicode-based text normalization to maintain a predictable document hierarchy.

Features

  • Markdown Specification Standards - Establishes the definitive set of rules for parsing plain text into consistent HTML output.
  • Formal Grammar Specifications - Defines the formal technical specifications of the markdown language syntax using algorithmic prose and unambiguous rules.
  • Markdown Parsers - Provides a formal specification and reference logic for engines that interpret markdown syntax.
  • Parser Conformance Testing - Includes a comprehensive conformance suite to validate that markdown parsers adhere strictly to the specification.
  • Markdown to HTML Renderers - Converts parsed markdown into compliant HTML output for consistent visual presentation.
  • Markup Syntax Standardization - Provides a detailed grammar specification to ensure consistent rendering across different platforms.
  • Language Standard Specifications - Serves as the authoritative formal definition of syntax and behavior for the markdown format.
  • Multi-Phase Parsing - Utilizes a two-phase parsing model to decouple structural block identification from inline text formatting.
  • Unicode Normalization - Standardizes input text by expanding tabs and normalizing characters to ensure consistent parsing and rendering.
  • Abstract Syntax Tree Parsing - Implements a structured tree representation to analyze the relationships between document elements during parsing.
  • Document Object Models - Establishes a leaf-and-container hierarchy to organize document layout and structural relationships.
  • Text Input Normalizers - Normalizes input by expanding tabs and replacing insecure Unicode characters to ensure predictable rendering.
  • Syntax Parsing Engines - Provides the engine logic to convert raw text into structured syntax trees or HTML.
  • Markup Rendering Rules - Defines the precise rules for rendering headers, lists, and code blocks to maintain document hierarchy.
  • ATX Headings - Defines document headings from levels 1 through 6 using hash characters at the start of a line.
  • Code Block Embedding - Supports the inclusion of verbatim source code segments using backtick or tilde fences with optional language labels.
  • Reference Link Registries - Implements a reference-based system for managing reusable hyperlinks and images via unique labels.
  • Setext Headings - Defines level 1 or 2 headings by underlining a line of text with equals or hyphen characters.
  • Inline HTML Integration - Identifies inline HTML tags, attributes, and comments to be rendered without escaping.
  • Semantic Line Breaks - Defines rules to determine whether newlines should be rendered as hard breaks or soft wraps in the final output.
  • Parsing Priority Rules - Prioritizes structural block elements over inline formatting to ensure consistent document layout.
  • Reference Implementations - Provides standard-compliant parsers in C and JavaScript as a model for correct implementation.
  • Syntax Escaping - Implements backslash-based escaping to treat punctuation as literal text and prevent it from being parsed as markup.
  • Block Level Parsing Rules - Standardizes the logic for identifying structural block elements like paragraphs and headings.
  • Markup Validation Suites - Includes a parser conformance suite to verify that implementations adhere to the specification.
  • Standard Compliance Certification Testing - Provides an automated verification suite to certify that parser implementations adhere to the formal specification.
  • Implementation Validation Suites - Provides a standardized test suite to verify that parser implementations are compliant with the formal specification.
  • Quote Blocks - Implements block-level elements for citations and excerpts using the greater-than symbol.
  • Inline Code Spans - Provides syntax for wrapping short fragments of literal text in backtick delimiters to prevent formatting.
  • Rich Text Styling - Standardizes the use of asterisks and underscores to create bold and italic text formatting.
  • Thematic Break Elements - Defines structural elements for thematic breaks using sequences of asterisks, underscores, or hyphens.
  • Block HTML Embedding - Recognizes raw HTML tags and comments as block-level elements that bypass standard parsing.
  • Paragraph Elements - Groups sequences of non-blank lines into structural blocks for inline element parsing.
  • Nested Lists - Supports ordered and bulleted lists with hierarchical nesting and variable indentation.
  • General Libraries - C implementation of the CommonMark specification.
  • General Purpose Libraries - C implementation of the CommonMark specification.
  • Windows Environments - Listed in the “Windows Environments” section of the Awesome C awesome list.

Star history

Star history chart for commonmark/commonmark-specStar history chart for commonmark/commonmark-spec

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

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

Frequently asked questions

What does commonmark/commonmark-spec do?

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.

What are the main features of commonmark/commonmark-spec?

The main features of commonmark/commonmark-spec are: Markdown Specification Standards, Formal Grammar Specifications, Markdown Parsers, Parser Conformance Testing, Markdown to HTML Renderers, Markup Syntax Standardization, Language Standard Specifications, Multi-Phase Parsing.

What are some open-source alternatives to commonmark/commonmark-spec?

Open-source alternatives to commonmark/commonmark-spec include: jgm/commonmark — CommonMark is a formal standard specification for Markdown, providing a reference implementation and a set of rules to… whatwg/html — This repository contains the HTML specification, which defines the core standards for web page structuring, content… commonmark/commonmark.js — Commonmark.js is a library designed to parse and render text formatted according to the CommonMark specification. It… lunet-io/markdig — Markdig is a high-performance Markdown processor for .NET applications that converts Markdown text into HTML or other… xoofx/markdig — Markdig is a markdown parser library that converts text into structured HTML, plain text, or other formats using a… cloudwu/pbc — A protocol buffers library for C.

Open-source alternatives to Commonmark Spec

Similar open-source projects, ranked by how many features they share with Commonmark Spec.
  • jgm/commonmarkjgm avatar

    jgm/CommonMark

    5,106View on GitHub↗

    CommonMark is a formal standard specification for Markdown, providing a reference implementation and a set of rules to ensure consistent text rendering across different platforms. It consists of a Markdown parser implementation and a system for generating formal syntax documentation. The project includes a comprehensive conformance test suite with over five hundred embedded examples to verify that other Markdown implementations adhere to the specification. It provides tools to export these test cases in JSON format for use in external verification processes. The system covers document format

    Python
    View on GitHub↗5,106
  • whatwg/htmlwhatwg avatar

    whatwg/html

    9,163View on GitHub↗

    This repository contains the HTML specification, which defines the core standards for web page structuring, content organization, and document rendering. It establishes the fundamental algorithms for state-machine-based tokenization, tree construction for the document object model, and origin-based security isolation. The specification provides a framework for defining custom elements with independent lifecycles and registries. It also details the requirements for cross-document communication, session history management, and the synchronization of interface properties with content attributes.

    HTMLcanvaseventsourcehtml
    View on GitHub↗9,163
  • commonmark/commonmark.jscommonmark avatar

    commonmark/commonmark.js

    1,559View on GitHub↗

    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,

    JavaScript
    View on GitHub↗1,559
  • 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
  • See all 30 alternatives to Commonmark Spec→