myst-parser
An extended [CommonMark](https://spec.commonmark.org/) compliant parser,
Description
# MyST-Parser [![Github-CI][github-ci]][github-link] [![Coverage Status][codecov-badge]][codecov-link] [![Documentation Status][rtd-badge]][rtd-link] [![Code style: black][black-badge]][black-link] [![PyPI][pypi-badge]][pypi-link] [![Conda][conda-badge]][conda-link] [![PyPI - Downloads][install-badge]][install-link] **MyST is a rich and extensible flavor of Markdown meant for technical documentation and publishing**. MyST is a flavor of markdown that is designed for simplicity, flexibility, and extensibility. This repository serves as the reference implementation of MyST Markdown, as well as a collection of tools to support working with MyST in Python and Sphinx. It contains an extended [CommonMark](https://commonmark.org)-compliant parser using [`markdown-it-py`](https://markdown-it-py.readthedocs.io/), as well as a [Sphinx](https://www.sphinx-doc.org) extension that allows you to write MyST Markdown in Sphinx. [**See the MyST Parser documentation for more information**](https://myst-parser.readthedocs.io/en/latest/). ## Installation To install the MyST parser, run the following in a [Conda environment](https://docs.conda.io) (recommended): ```bash conda install -c conda-forge myst-parser ``` or ```bash pip install myst-parser ``` Or for package development: ```bash git clone https://github.com/executablebooks/MyST-Parser cd MyST-Parser git checkout master pip install -e .[code_style,linkify,testing,rtd] ``` To use the MyST parser in Sphinx, simply add: `extensions = ["myst_parser"]` to your `conf.py`. ## Contributing We welcome all contributions! See the [Contributing Guide](https://myst-parser.readthedocs.io/en/latest/develop/index.html) for more details. [github-ci]: https://github.com/executablebooks/MyST-Parser/workflows/continuous-integration/badge.svg?branch=master [github-link]: https://github.com/executablebooks/MyST-Parser [codecov-badge]: https://codecov.io/gh/executablebooks/MyST-Parser/branch/master/graph/badge.svg [codecov-link]: https://codecov.io/gh/executablebooks/MyST-Parser [rtd-badge]: https://readthedocs.org/projects/myst-parser/badge/?version=latest [rtd-link]: https://myst-parser.readthedocs.io/en/latest/?badge=latest [black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg [pypi-badge]: https://img.shields.io/pypi/v/myst-parser.svg [pypi-link]: https://pypi.org/project/myst-parser [conda-badge]: https://anaconda.org/conda-forge/myst-parser/badges/version.svg [conda-link]: https://anaconda.org/conda-forge/myst-parser [black-link]: https://github.com/ambv/black [install-badge]: https://img.shields.io/pypi/dw/myst-parser?label=pypi%20installs [install-link]: https://pypistats.org/packages/myst-parser
Release History
| Version | Changes | Urgency | Date |
|---|---|---|---|
| 5.0.0 | Imported from PyPI (5.0.0) | Low | 4/21/2026 |
| v5.0.0 | # MyST-Parser 5.0.0 **Release Date**: 2026-01-15 This release significantly bumps the supported versions of core dependencies: ## βΌοΈ Breaking Changes This release updates the minimum supported versions: - **Python**: `>=3.11` (dropped Python 3.10, tests up to 3.14) - **Sphinx**: `>=8,<10` (dropped Sphinx 7, added Sphinx 9) - **Docutils**: `>=0.20,<0.23` (dropped docutils 0.19, added docutils 0.22) - **markdown-it-py**: `~=4.0` (upgraded from v3) ## β¬οΈ Dependency Upgrades | Low | 1/15/2026 |
| v4.0.1 | ## What's Changed * π§ Minor fix for sphinx 8.2 compat by @chrisjsewell in https://github.com/executablebooks/MyST-Parser/pull/1013 * π§ͺ Add CI testing support for Python 3.13 by @hugovk in https://github.com/executablebooks/MyST-Parser/pull/955 * π§ Fix type of MockIncludeDirectiveβs `klass` parameter by @flying-sheep in https://github.com/executablebooks/MyST-Parser/pull/975 * π Fix typos discovered by codespell by @cclauss in https://github.com/executablebooks/MyST-Parser/pull/969 | Low | 2/12/2025 |
| v4.0.0 | ## What's Changed * β¬οΈ Support python>=3.10, sphinx >=7,<9, docutils>=0.19,<0.22 by @chrisjsewell in https://github.com/executablebooks/MyST-Parser/pull/952 * π Improve footnote def/ref warnings and translations by @chrisjsewell in https://github.com/executablebooks/MyST-Parser/pull/931 * π Fix typo by @meli-lewis in https://github.com/executablebooks/MyST-Parser/pull/940 ## New Contributors * @meli-lewis made their first contribution in https://github.com/executablebooks/MyST-Parser/ | Low | 8/5/2024 |
| v3.0.1 | ## What's Changed * π FIX empty value for final directive option by @chrisjsewell in https://github.com/executablebooks/MyST-Parser/pull/924 * π FIX: allow indented option block by @chrisjsewell in https://github.com/executablebooks/MyST-Parser/pull/925 **Full Changelog**: https://github.com/executablebooks/MyST-Parser/compare/v3.0.0...v3.0.1 | Low | 4/28/2024 |
| v3.0.0 | ## What's Changed ### Upgraded dependencies * β¬οΈ Add support for Python 3.12 by @hugovk in https://github.com/executablebooks/MyST-Parser/pull/848 * β¬οΈ Update docutils requirement from >=0.16,<0.21 to >=0.18,<0.22 by @chrisjsewell in https://github.com/executablebooks/MyST-Parser/pull/916 ### New features * β¨ Allow for use of the `line-block` directive by @chrisjsewell in https://github.com/executablebooks/MyST-Parser/pull/900 * β¨ Emits sphinx include-read event by @sumezulike in h | Low | 4/23/2024 |
| v2.0.0 | This release primarily updates core myst-parser dependencies, with some minor changes to parsing behaviour: * β¬οΈ UPGRADE: `markdown-it-py` to v3 (https://github.com/executablebooks/MyST-Parser/pull/773) * This is mainly a non-breaking change, fixing some edge cases in parsing * See: <https://github.com/executablebooks/markdown-it-py/releases/tag/v3.0.0> and <https://github.com/executablebooks/mdit-py-plugins/releases/tag/v0.4.0> * β¬οΈ UPGRADE: `linkify-it-py` to v2 (https://gith | Low | 6/13/2023 |
| v1.0.0 | π **MyST-Parser 1.0.0** π This changes absolutely nothing in the code, or about the maintenance/release policy of this project. But it does feel about time π | Low | 3/7/2023 |
| v0.19.2 | ## What's Changed * β¨ NEW: Add `myst_fence_as_directive` config by @chrisjsewell in https://github.com/executablebooks/MyST-Parser/pull/742 Setting the following config, for example: ```python extensions = ["myst_parser", "sphinxcontrib.mermaid"] myst_fence_as_directive = ["mermaid"] # optional to use directive options myst_enable_extensions = ["attrs_block"] ``` allows for one to write: ````markdown {caption="My caption"} {alt="HTML alt" align=center} ```mermaid graph LR | Low | 3/7/2023 |
| v0.19.1 | ## What's Changed * π FIX NoURI error in doc reference resolution, for texinfo builds by @chrisjsewell in https://github.com/executablebooks/MyST-Parser/pull/734 **Full Changelog**: https://github.com/executablebooks/MyST-Parser/compare/v0.19.0...v0.19.1 | Low | 3/2/2023 |
| v0.19.0 | This release brings a number of exciting new features, improvements, and upgrades π https://myst-parser.readthedocs.io - π Rewritten documentation, with a clearer structure, many more examples, rich hover tips, and a new live preview page (powered by pyscript) - The code base API is also now fully documented by https://sphinx-autodoc2.readthedocs.io/, which even allows for MyST docstrings! - β¬οΈ Add Sphinx 6 support - π Extended docutils (single-page) support - π Extended Markdown l | Low | 3/1/2023 |
| v0.18.1 | ## What's Changed * π§ MAINTAIN: Minor fixes by @chrisjsewell in https://github.com/executablebooks/MyST-Parser/pull/585 * [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/executablebooks/MyST-Parser/pull/586 * π DOCS: redundant trailing `)` by @Ab2nour in https://github.com/executablebooks/MyST-Parser/pull/588 * [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/executablebooks/MyST-Parser/pull/595 * π DOCS: Fix typos in syntax.md b | Low | 9/27/2022 |
| v0.18.0 | ## What's Changed * π IMPROVE: Do not let sphinx check the config type by @chrisjsewell in https://github.com/executablebooks/MyST-Parser/pull/559 * β»οΈπ Restructure code base and documentation by @chrisjsewell in https://github.com/executablebooks/MyST-Parser/pull/566 * π FIX: floor table column widths to integers by @Jean-Abou-Samra in https://github.com/executablebooks/MyST-Parser/pull/568 * β¬οΈ Drop Sphinx 3, add Sphinx 5 by @chrisjsewell in https://github.com/executablebooks/MyST-Parse | Low | 6/7/2022 |
| v0.17.2 | ## What's Changed * β»οΈ REFACTOR: Replace attrs by dataclasses by @chrisjsewell in https://github.com/executablebooks/MyST-Parser/pull/557 **Full Changelog**: https://github.com/executablebooks/MyST-Parser/compare/v0.17.1...v0.17.2 | Low | 4/17/2022 |
| v0.17.1 | ## What's Changed * π DOC: Update auto-generated header anchors section by @choldgraf in https://github.com/executablebooks/MyST-Parser/pull/524 * π FIX: Heading anchor resolution for parallel builds by @chrisjsewell in https://github.com/executablebooks/MyST-Parser/pull/525 * π DOCS: Fix typo by @rowanc1 in https://github.com/executablebooks/MyST-Parser/pull/526 * π DOCS: Fix typos by @kianmeng in https://github.com/executablebooks/MyST-Parser/pull/535 * π§ MAINTAIN: Change git to http | Low | 4/15/2022 |
| v0.17.0 | See: https://myst-parser.readthedocs.io/en/latest/develop/_changelog.html ## What's Changed * π IMPROVE: Add `bullet` attribute to `bullet_list` node by @chrisjsewell in https://github.com/executablebooks/MyST-Parser/pull/465 * π IMPROVE: Use correct renderer for `state.inline_text` by @chrisjsewell in https://github.com/executablebooks/MyST-Parser/pull/466 * π§ͺ TESTS: Use `publish_doctree` to test error reporting by @chrisjsewell in https://github.com/executablebooks/MyST-Parser/pull/47 | Low | 2/11/2022 |
| v0.16.1 | ## What's Changed * π DOCS: Fix myst-docutils README by @jpmckinney in https://github.com/executablebooks/MyST-Parser/pull/462 * β¨ NEW: Add `myst_linkify_fuzzy_links` option by @chrisjsewell in https://github.com/executablebooks/MyST-Parser/pull/464 **Full Changelog**: https://github.com/executablebooks/MyST-Parser/compare/v0.16.0...v0.16.1 | Low | 12/16/2021 |
| v0.16.0 | ## What's Changed * π RELEASE: v0.15.2 (maintenance release) by @mmcky in https://github.com/executablebooks/MyST-Parser/pull/423 * FIX: Add mandatory attributes on enumerated_list by @cpitclaudel in https://github.com/executablebooks/MyST-Parser/pull/418 * π DOCS: Add reference to MySTyc in landing page by @astrojuanlu in https://github.com/executablebooks/MyST-Parser/pull/413 * [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/executablebooks/MyST-Parser/pull/ | Low | 12/11/2021 |
| v0.15.2 | Release v0.15.2 | Low | 8/27/2021 |
| v0.15.1 | See [CHANGELOG.md](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md) | Low | 6/17/2021 |
| v0.15.0 | See [CHANGELOG.md](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md) | Low | 6/12/2021 |
| v0.14.0 | See [CHANGELOG.md](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md) | Low | 5/4/2021 |
| v0.14.0a3 | Alpha release of v0.14.0a3, for testing myst-nb | Low | 5/1/2021 |
| v0.14.0a2 | Alpha release of v0.14.0a2, for testing myst-nb | Low | 4/25/2021 |
| v0.14.0a1 | Alpha release of v0.14.0a1, for testing myst-nb | Low | 4/25/2021 |
| v0.13.7 | See [CHANGELOG.md](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md) | Low | 4/24/2021 |
| v0.13.6 | See [CHANGELOG.md](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md) | Low | 4/9/2021 |
| v0.13.5 | See [CHANGELOG.md](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md) | Low | 2/15/2021 |
| v0.13.3 | See CHANGELOG.md | Low | 1/20/2021 |
| v0.13.2 | See [CHANGELOG.md](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md) | Low | 1/20/2021 |
| v0.13.1 | See [CHANGELOG.md](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md) | Low | 12/31/2020 |
| v0.13.0 | See [CHANGELOG.md](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md) | Low | 12/18/2020 |
| v0.12.10 | See [CHANGELOG.md](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md) | Low | 9/21/2020 |
| v0.12.9 | See [CHANGELOG.md](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md) | Low | 9/8/2020 |
| v0.12.8 | See [CHANGELOG.md](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md) | Low | 9/1/2020 |
| v0.12.7 | See [CHANGELOG.md](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md) | Low | 8/31/2020 |
| v0.12.6 | See [CHANGELOG.md](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md) | Low | 8/28/2020 |
| v0.12.5 | See [CHANGELOG.md](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md) | Low | 8/27/2020 |
| v0.12.4 | See [CHANGELOG.md](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md) | Low | 8/26/2020 |
| v0.12.3 | See [CHANGELOG.md](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md) | Low | 8/26/2020 |
| v0.12.2 | See [CHANGELOG.md](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md) | Low | 8/25/2020 |
| v0.12.1 | See [CHANGELOG.md](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md) | Low | 8/21/2020 |
| v0.12.0 | See [CHANGELOG.md](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md) | Low | 8/19/2020 |
| v0.11.2 | See [CHANGELOG.md](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md) for info | Low | 8/13/2020 |
| v0.11.1 | See [CHANGELOG.md](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md) for info | Low | 8/12/2020 |
| v0.11.0 | See [CHANGELOG.md](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md) for info | Low | 8/12/2020 |
| v0.10.0 | See [CHANGELOG.md](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md) for info | Low | 8/7/2020 |
| v0.9.1 | Also updates to documentation CLI | Low | 7/20/2020 |
| v0.9.0 | `sphinx` was originally an extra requirement, when `myst-parser` also contained markdown parsing extensions. This is all contained in `markdown-it-py` now, so there is generally no use case for `myst-parser` without sphinx | Low | 6/22/2020 |
| v0.8.2 | Release v0.8.2 | Low | 6/12/2020 |
| v0.8.1 | This is required by docutils/sphinx, which expects inline content to be within a block level parent. For example, for URL references this was causing build failures, as noted in #127. Thanks to @martinagvilas for the PR | Low | 4/15/2020 |
