GFM admonition syntax for Python Markdown
Project description
markdown-gfm-admonition
This package is an extension of Python Markdown that enables the admonition syntax of GitHub Flavored Markdown.
There are five types of admonitions:
> [!NOTE]
> Highlights information that users should take into account,
> even when skimming.
> [!TIP]
> Optional information to help a user be more successful.
> [!IMPORTANT]
> Crucial information necessary for users to succeed.
> [!WARNING]
> Critical content demanding immediate user attention due to potential risks.
> [!CAUTION]
> Negative potential consequences of an action.
It generates the same HTML as Python Markdown's built-in admonition extension:
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Highlights information that users should take into account,
even when skimming.</p>
</div>
Usage
To use this extension, you need to install it first:
uv add markdown-gfm-admonition
# or
pip install markdown-gfm-admonition
Then, you can use it in your Python code like this:
from markdown import Markdown
from markdown_gfm_admonition import GfmAdmonitionExtension
md = Markdown(extensions=[GfmAdmonitionExtension()])
html = md.convert("""
> [!NOTE]
> Highlights information that users should take into account,
> even when skimming.
""")
[!TIP] Instead of importing
GfmAdmonitionExtensiondirectly, you can use the entry point"gfm_admonition"as well to load the extension:md = Markdown(extensions=["gfm_admonition"])
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file markdown_gfm_admonition-0.3.0.tar.gz.
File metadata
- Download URL: markdown_gfm_admonition-0.3.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20a37febc79222badb6dfbfcbf0a74b94c0a6259b0f27e9f783601fea59094b6
|
|
| MD5 |
6a9546cb2bee7e2f5b911529f009f734
|
|
| BLAKE2b-256 |
595b1e7114e8fac6aadf2a25dab2e24a1eba54acd504d6a5747928a3eb09d7fd
|
Provenance
The following attestation bundles were made for markdown_gfm_admonition-0.3.0.tar.gz:
Publisher:
build.yaml on dahlia/markdown-gfm-admonition
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
markdown_gfm_admonition-0.3.0.tar.gz -
Subject digest:
20a37febc79222badb6dfbfcbf0a74b94c0a6259b0f27e9f783601fea59094b6 - Sigstore transparency entry: 730629762
- Sigstore integration time:
-
Permalink:
dahlia/markdown-gfm-admonition@7a401bd0c35e7dfc90a7c7df396cd33e5473ee69 -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/dahlia
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yaml@7a401bd0c35e7dfc90a7c7df396cd33e5473ee69 -
Trigger Event:
push
-
Statement type:
File details
Details for the file markdown_gfm_admonition-0.3.0-py3-none-any.whl.
File metadata
- Download URL: markdown_gfm_admonition-0.3.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e49bfea892f4c220b7f7b9479462360b69c68ae7cae7739e288b5382d0ae9b5
|
|
| MD5 |
389d39294b996f50bd8cb9d607c5e27a
|
|
| BLAKE2b-256 |
fc86ce4288122111c11bb2483a962357baa9793817d48ac1e99ce5ff47384efe
|
Provenance
The following attestation bundles were made for markdown_gfm_admonition-0.3.0-py3-none-any.whl:
Publisher:
build.yaml on dahlia/markdown-gfm-admonition
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
markdown_gfm_admonition-0.3.0-py3-none-any.whl -
Subject digest:
8e49bfea892f4c220b7f7b9479462360b69c68ae7cae7739e288b5382d0ae9b5 - Sigstore transparency entry: 730629779
- Sigstore integration time:
-
Permalink:
dahlia/markdown-gfm-admonition@7a401bd0c35e7dfc90a7c7df396cd33e5473ee69 -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/dahlia
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yaml@7a401bd0c35e7dfc90a7c7df396cd33e5473ee69 -
Trigger Event:
push
-
Statement type: