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.1.tar.gz
(8.1 kB
view hashes)
Built Distribution
Close
Hashes for mdformat_admon-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fe25914cfccd150c88481c90a920dfa827c46a327301eb4f5220c8e2798ee39 |
|
MD5 | c8bb02248239e2d7559f7f9e7c60e7b1 |
|
BLAKE2b-256 | a01ee9c4def03db61a1a14230c5170eaf833f23be5e18dea7c438262caa51396 |