# cmark

> reference implementation of CommonMark in C

**Wikidata**: [Q103715627](https://www.wikidata.org/wiki/Q103715627)  
**Source**: https://4ort.xyz/entity/cmark

## Summary
**cmark** is the reference implementation of CommonMark, a standardized version of the Markdown markup language, written in the C programming language. Developed by John MacFarlane, it functions as a free software library and is distributed under the permissive 2-clause BSD License. It is designed to operate on Unix-like operating systems and Microsoft Windows.

## Key Facts
- **Description:** cmark is the reference implementation of CommonMark in C.
- **Developer:** Created by John MacFarlane, an American philosopher and programmer.
- **License:** Distributed under the 2-clause BSD License.
- **Programming Language:** Written in C (Wikidata ID: Q15777).
- **Operating Systems:** Compatible with Unix-like operating systems and Microsoft Windows.
- **Software Class:** Classified as a software library and free software.
- **Source Repository:** Hosted at `https://github.com/commonmark/cmark`.
- **Release History:** Includes versions such as 0.17 (released Jan 25, 2015) through 0.24.0 (released Jan 13, 2016).
- **Package Availability:** Available in standard repositories for Debian, Ubuntu, Fedora, Arch Linux, Gentoo, openSUSE, FreeBSD, OpenBSD, and Homebrew.

## FAQs
### Q: What is cmark used for?
A: cmark is used as the standard reference implementation for parsing and rendering CommonMark, a rationalized version of Markdown syntax. It provides a library for developers to integrate standardized Markdown processing into applications written in C.

### Q: Who created cmark?
A: cmark was created by John MacFarlane, an American philosopher and programmer who is also a key figure in the development of CommonMark and related text parsing tools.

### Q: Is cmark free to use?
A: Yes, cmark is free software licensed under the 2-clause BSD License. This allows users to freely run, study, change, and distribute the software and its modified versions.

### Q: On which operating systems does cmark run?
A: cmark runs on Unix-like operating systems (such as Linux and macOS) and Microsoft Windows.

## Why It Matters
cmark plays a critical role in the standardization of Markdown. Before CommonMark, Markdown implementations varied widely, leading to inconsistent rendering of documents across different platforms. As the "reference implementation," cmark provides the definitive behavior against which other implementations are measured, ensuring that documents parsed with cmark adhere strictly to the CommonMark specification.

Its significance is further underscored by its widespread availability in major software repositories, including Debian, Fedora, Arch Linux, and Homebrew, making it easily accessible for integration into larger software projects. By offering a C-based implementation, it allows for high-performance parsing that can be embedded in a vast array of systems, from command-line tools to web servers, bridging the gap between human-readable text and structured digital content.

## Notable For
- **Reference Standard:** Serves as the official benchmark for CommonMark compliance.
- **Authorship:** Developed by John MacFarlane, a prominent figure in document conversion and markup standards (creator of Pandoc).
- **Portability:** Written in C, ensuring high compatibility and performance across different hardware and operating systems.
- **Permissive Licensing:** Uses the 2-clause BSD License, facilitating broad adoption in both open-source and proprietary software.
- **Broad Distribution:** Maintained in the official package repositories of virtually every major Linux distribution and BSD variant.

## Body

### Development and Origin
cmark is developed by John MacFarlane, an American philosopher and university teacher who is also recognized for his contributions to programming, particularly in the realm of markup languages. The project serves as the C-based reference implementation for the CommonMark specification, aiming to resolve the ambiguities found in original Markdown parsers.

### Technical Specifications
The software is categorized as a software library and free software. It is copyrighted but distributed freely under the **2-clause BSD License**. The code is written in **C** (specifically referencing the standard C library capabilities) and managed via a Git repository hosted on GitHub.

### Version History
The development of cmark has been tracked through numerous releases, with specific versions cited in the project's history during 2015 and 2016:

- **0.17:** Released January 25, 2015
- **0.18:** Released March 4, 2015
- **0.18.1:** Released March 10, 2015
- **0.18.2:** Released March 30, 2015
- **0.18.3:** Released April 1, 2015
- **0.19.0:** Released April 29, 2015
- **0.20.0:** Released June 8, 2015
- **0.21.0:** Released July 15, 2015
- **0.22.0:** Released August 24, 2015
- **0.24.0:** Released January 13, 2016

### Availability and Installation
cmark is widely supported across different operating system ecosystems. It is natively available for **Microsoft Windows** and **Unix-like operating systems**. Specific integration points include:

- **Linux Distributions:** Fedora (`cmark`), Gentoo (`app-text/cmark`), Ubuntu (`cmark`), Debian Stable (`cmark`), Arch Linux (`cmark`), and openSUSE (`cmark`).
- **BSD Systems:** FreeBSD (`textproc/cmark`) and OpenBSD (`textproc/cmark`).
- **Package Managers:** Homebrew (`cmark` formula) and SlackBuilds (`libraries/cmark`).
- **Repology:** The project is tracked under the name `cmark` in Repology.

The source code is publicly available for cloning or download at the official GitHub repository: `https://github.com/commonmark/cmark`.

## References

1. [Source](https://github.com/commonmark/commonmark-spec/blob/master/README.md)
2. [Source](https://api.github.com/repos/commonmark/cmark)
3. [Release 0.17. 2015](https://github.com/commonmark/cmark/releases/tag/0.17)
4. [Release 0.18. 2015](https://github.com/commonmark/cmark/releases/tag/0.18)
5. [Release 0.18.1. 2015](https://github.com/commonmark/cmark/releases/tag/0.18.1)
6. [Release 0.18.2. 2015](https://github.com/commonmark/cmark/releases/tag/0.18.2)
7. [Release 0.18.3. 2015](https://github.com/commonmark/cmark/releases/tag/0.18.3)
8. [Release 0.19.0. 2015](https://github.com/commonmark/cmark/releases/tag/0.19.0)
9. [Release 0.20.0. 2015](https://github.com/commonmark/cmark/releases/tag/0.20.0)
10. [Release 0.21.0. 2015](https://github.com/commonmark/cmark/releases/tag/0.21.0)
11. [Release 0.22.0. 2015](https://github.com/commonmark/cmark/releases/tag/0.22.0)
12. [Release 0.24.0. 2016](https://github.com/commonmark/cmark/releases/tag/0.24.0)
13. [Release 0.24.1. 2016](https://github.com/commonmark/cmark/releases/tag/0.24.1)
14. [Release 0.25.0. 2016](https://github.com/commonmark/cmark/releases/tag/0.25.0)
15. [Release 0.25.1. 2016](https://github.com/commonmark/cmark/releases/tag/0.25.1)
16. [Release 0.25.2. 2016](https://github.com/commonmark/cmark/releases/tag/0.25.2)
17. [Release 0.26.0. 2016](https://github.com/commonmark/cmark/releases/tag/0.26.0)
18. [Release 0.26.1. 2016](https://github.com/commonmark/cmark/releases/tag/0.26.1)
19. [Release 0.27.0. 2016](https://github.com/commonmark/cmark/releases/tag/0.27.0)
20. [Release 0.27.1. 2016](https://github.com/commonmark/cmark/releases/tag/0.27.1)
21. [Release 0.28.0. 2017](https://github.com/commonmark/cmark/releases/tag/0.28.0)
22. [Release 0.28.1. 2017](https://github.com/commonmark/cmark/releases/tag/0.28.1)
23. [Release 0.28.2. 2017](https://github.com/commonmark/cmark/releases/tag/0.28.2)
24. [Release 0.28.3. 2017](https://github.com/commonmark/cmark/releases/tag/0.28.3)
25. [Release 0.29.0. 2019](https://github.com/commonmark/cmark/releases/tag/0.29.0)
26. [Release 0.30.0. 2021](https://github.com/commonmark/cmark/releases/tag/0.30.0)
27. [Release 0.30.1. 2021](https://github.com/commonmark/cmark/releases/tag/0.30.1)
28. [Release 0.30.2. 2021](https://github.com/commonmark/cmark/releases/tag/0.30.2)
29. [Release 0.30.3. 2023](https://github.com/commonmark/cmark/releases/tag/0.30.3)
30. [Release 0.31.0. 2024](https://github.com/commonmark/cmark/releases/tag/0.31.0)
31. [Release 0.31.1. 2024](https://github.com/commonmark/cmark/releases/tag/0.31.1)
32. [Release 0.31.2. 2026](https://github.com/commonmark/cmark/releases/tag/0.31.2)