Mdformat plugin preserving wikilinks, frontmatter, and index delimiter.
Project description
mdformat-wiki
Mdformat plugin preserving wikilinks, frontmatter, and index delimiter.
Built for wikis created with
plasma-wiki — add it wherever
mdformat runs over a wiki maintained by plasma-wiki.
Source: https://github.com/plasma-ai/mdformat-wiki
Package: https://pypi.org/project/mdformat-wiki/
Installation
Install the mdformat-wiki package from PyPI, alongside
mdformat:
pip install mdformat-wiki
Use uv tool install mdformat --with mdformat-wiki to install in an
isolated environment.
Usage
Once installed, mdformat picks the plugin up automatically and stops disturbing wiki page faces:
[[...]]wikilinks parse atomically (single line, no nesting) and are never backslash-escaped — including the[[target|label]]pipe form.- YAML frontmatter at the start of a document renders byte-verbatim (fences and content untouched).
- A thematic break written exactly as
***keeps that face; every other break style is normalized as usual.
pre-commit
Repos that format markdown with a pre-commit
hook need one line — add the plugin to the mdformat hook's
additional_dependencies:
- repo: https://github.com/hukkin/mdformat
rev: 1.0.0
hooks:
- id: mdformat
additional_dependencies: [mdformat-wiki]
If the hook already lists
mdformat-frontmatter,
remove it — this plugin already renders frontmatter byte-verbatim. Both
plugins register a frontmatter renderer, mdformat only warns about the
conflict, and whichever the environment discovers first wins: when
mdformat-frontmatter wins, it re-serializes the YAML (quoting values,
blanking nulls) instead of leaving it untouched.
Footnotes
Baseline mdformat escapes footnote definitions ([^1]: becomes
\[^1\]:). If your pages use footnotes, add
mdformat-footnote
alongside this plugin — the two compose cleanly (definitions relocate to
the document bottom, which is semantically neutral).
Development
Install
Run install.sh in the package root. With no environment active it
creates and uses a local .venv; with one active (e.g. pyenv) it
installs into that environment (editable), without recreating it:
./install.sh --all-extras --groups=test,lint,type
Run ./install.sh --help for all options. Alternatively, run
uv sync --all-extras --group test --group lint --group type and
uv run pre-commit install to set up the environment manually.
Installing a dependency as editable (e.g. a sibling package) is left to
the caller: uv pip install --editable <path>.
Once installed, run tools with uv run <command>, or activate the
environment first (source .venv/bin/activate).
Tests
Run the test suite:
pytest .
Linting
Run linters and formatters:
pre-commit run --all-files
License
Licensed under the Apache License 2.0 — see LICENSE.
Copyright © 2026 Plasma AI
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
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 mdformat_wiki-0.1.0.tar.gz.
File metadata
- Download URL: mdformat_wiki-0.1.0.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bf4edd2da5d899e15d5fca1a841e92b7599cec1ef185d9474e1b736ad9cb87c
|
|
| MD5 |
4d4d2148db4b2f09f49bc773e794560d
|
|
| BLAKE2b-256 |
1c4422eac26414d2056a08097ba6606c0d008472753e97093670bac23f1ac152
|
Provenance
The following attestation bundles were made for mdformat_wiki-0.1.0.tar.gz:
Publisher:
build.yaml on plasma-ai/mdformat-wiki
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mdformat_wiki-0.1.0.tar.gz -
Subject digest:
1bf4edd2da5d899e15d5fca1a841e92b7599cec1ef185d9474e1b736ad9cb87c - Sigstore transparency entry: 2132337384
- Sigstore integration time:
-
Permalink:
plasma-ai/mdformat-wiki@7f45dd5be51112633a17745a9492836aab8818b3 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/plasma-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yaml@7f45dd5be51112633a17745a9492836aab8818b3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mdformat_wiki-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mdformat_wiki-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86416ac40280c6597a1a417273434b6b9a8340ac192b4bcca0a5c3096e098c3d
|
|
| MD5 |
a47db454aa956735ff8dc4319930b312
|
|
| BLAKE2b-256 |
7308ba77140465a45b4e80253cdaecca747bf42e3d8f555b048163a70aee9426
|
Provenance
The following attestation bundles were made for mdformat_wiki-0.1.0-py3-none-any.whl:
Publisher:
build.yaml on plasma-ai/mdformat-wiki
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mdformat_wiki-0.1.0-py3-none-any.whl -
Subject digest:
86416ac40280c6597a1a417273434b6b9a8340ac192b4bcca0a5c3096e098c3d - Sigstore transparency entry: 2132337528
- Sigstore integration time:
-
Permalink:
plasma-ai/mdformat-wiki@7f45dd5be51112633a17745a9492836aab8818b3 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/plasma-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yaml@7f45dd5be51112633a17745a9492836aab8818b3 -
Trigger Event:
push
-
Statement type: