An mdformat plugin for admonitions.
Project description
mdformat-admon
An mdformat plugin for admonitions.
Usage
Add this package wherever you use mdformat
and the plugin will be auto-recognized. No additional configuration necessary. See additional information on mdformat
plugins here
Pre-commit
repos:
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.16
hooks:
- id: mdformat
additional_dependencies:
- mdformat-admon
pipx
pipx install mdformat
pipx inject mdformat mdformat-admon
Caveats
This plugin currently only supports admonitions that start with !!! ...
and won't modify admonitions for Github, which should cover most use cases. Future work is planned for other types.
See the example test file: ./tests/pre-commit-test.md
As a quick summary:
- python-markdown: is fully supported by
mdformat-admon
and tested extensively in ./tests/fixtures.md - MKdocs: Is fully supported
- Unsupported, but won't modify:
- Github: Unsupported and will not modify
- MyST: Unsupported and will not modify
- Remark-Admonitions: Unsupported and will not modify
mdformat
will break admonitions by:- reStructuredText: Unsupported and will break by removing or modifying indentation
- Obsidian Callouts: Unsupported and will break because
mdformat
adds extra characters
Contributing
See CONTRIBUTING.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mdformat_admon-1.0.2.tar.gz
(6.4 kB
view hashes)
Built Distribution
Close
Hashes for mdformat_admon-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ab208bd1bc95122b4eca16aa65f42b4c1cf9ea579201dd946dfc40a4cb005b8 |
|
MD5 | 1a5fc9c506d990d2309db6b490364250 |
|
BLAKE2b-256 | 83b5ae19f582ceabe514044838c4e9bb68e1903dfc224106d3e2fe19759af1e4 |