Skip to content

executablebooks/MyST-Parser

Repository files navigation

myst_parser

Build Status

An extended commonmark compliant parser, with bridges to docutils & sphinx.

Installing

This parser currently requires the ExecutableBookProject/mistletoe fork of mistletoe (and the myst branch).

pip install git+https://github.com/ExecutableBookProject/mistletoe.git@myst

To use the Myst parser in sphinx, simply add: extensions = ["myst_parser"] to your conf.py.

Contributing

To contribute, make Pull Requests to the develop branch (this is the default branch).

Code style is tested using flake8, with the configuration set in .flake8, and code formatted with black.

Installing with myst_parser[code_style] makes the pre-commit package available, which will ensure this style is met before commits are submitted, by reformatting the code and testing for lint errors. It can be setup by:

>> cd myst_parser
>> pre-commit install

Optionally you can run black and flake8 separately:

>> black .
>> flake8 .

Editors like VS Code also have automatic code reformat utilities, which can adhere to this standard.