mdformat插件,用于...
项目描述
mdformat-pyproject
一个从pyproject.toml
读取配置的mdformat插件。
安装
使用以下方式安装
pip install mdformat-pyproject
用法
安装此插件后,可以在pyproject.toml
文件中的新[tool.mdformat]
部分添加mdformat configuration
。
[tool.mdformat]
wrap = "keep" # possible values: {"keep", "no", INTEGER}
number = false # possible values: {false, true}
end_of_line = "lf" # possible values: {"lf", "crlf", "keep"}
用作pre-commit钩子
将以下内容添加到您的.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