Skip to content

Make `mdformat` read configuration from `pyproject.toml`

License

Notifications You must be signed in to change notification settings

pythiac/mdformat-pyproject

 
 

Repository files navigation

mdformat-pyproject

Build Status codecov.io PyPI version

An mdformat plugin to read configuration from pyproject.toml.

⚠️ WARNING: it has been detected that some native mdformat options like end_of_line or exclude are currently being ignored when included in the pyproject.toml file. The issue is being worked on right now. You can read more here in issue #4

Install

Install with:

pip install mdformat-pyproject

Usage

After installing this plugin, the mdformat configuration can be added in a new [tool.mdformat] section inside the pyproject.toml file.

[tool.mdformat]
wrap = "keep"       # possible values: {"keep", "no", INTEGER}
number = false      # possible values: {false, true}
end_of_line = "lf"  # possible values: {"lf", "crlf", "keep"}

Usage as a pre-commit hook

Add the following to your .pre-commit-config.yaml:

- repo: https://github.com/executablebooks/mdformat
  rev: 0.7.13  # Use the ref you want to point at
  hooks:
    - id: mdformat
      additional_dependencies:
        - mdformat-pyproject

About

Make `mdformat` read configuration from `pyproject.toml`

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%