Skip to main content

mdformat-admon

Build Status PyPI version

An mdformat plugin for formatting python-markdown admonitions and rendering the associated HTML.

mdformat 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.19
    hooks:
      - id: mdformat
        additional_dependencies:
          - mdformat-admon

pipx/uv

pipx install mdformat
pipx inject mdformat mdformat-admon

Or with uv:

uv tool run --from mdformat-admon mdformat

HTML Rendering

To generate HTML output, python_markdown_admon_plugin can be imported from mdit_plugins. More plugins will be added in the future. For more guidance on MarkdownIt, see the docs: https://markdown-it-py.readthedocs.io/en/latest/using.html#the-parser

from markdown_it import MarkdownIt
from mdformat_admon.mdit_plugins import python_markdown_admon_plugin

md = MarkdownIt()
md.use(python_markdown_admon_plugin)

text = '!!! note ""\n    *content*'
md.render(text)
# <div class="admonition note">
# <p><em>content</em></p>
# </div>

Contributing

See CONTRIBUTING.md

Metadata

Release files for mdformat_admon 2.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mdformat_admon 2.1.1
File Size Uploaded Provenance Actions
mdformat_admon-2.1.1.tar.gz 13.3 kB Without provenance Details for mdformat_admon-2.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mdformat_admon 2.1.1
File Interpreter ABI Platform Actions
mdformat_admon-2.1.1-py3-none-any.whl Python 3 none any Details for mdformat_admon-2.1.1-py3-none-any.whl

Total release size: 24.3 kB

Release files / mdformat_admon-2.1.1.tar.gz

Download URL mdformat_admon-2.1.1.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
605df53bec06eba63f0ad510f7f67cdead9c328ec807bca1db76026a66a68d9e
BLAKE2b-256 checksum
How to use checksums
cb425188f91e20ef1c563b4feb687f300c9ff4d16b4105dd94aab61bda8e3cef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.3

Release files / mdformat_admon-2.1.1-py3-none-any.whl

Download URL mdformat_admon-2.1.1-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f2efae84da6d4eaa453a7cf0eca7437dc1c1e347a0780abfa5eecfdda03630c2
BLAKE2b-256 checksum
How to use checksums
9e0d1d9a3a59295ce2236bec57a90a32a81bb268aad03e1daa3b40db7e9f44a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.3

Security for mdformat_admon 2.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page