Registry / devops / mdformat-deflist

mdformat-deflist

JSON →
library0.1.4pypypiunverified

An mdformat plugin that adds definition list support using markdown-it-deflist. Version 0.1.4, last updated 2023-01-26. Requires Python >=3.10.

pip install mdformat-deflist
INSTALL
IMPORT
SIG · MDFORMAT-DEFLIST
M
mdformat-deflist
devopspythonv0.1.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Basic usage: import mdformat and pass extensions=['deflist'] to enable the plugin.

import mdformat # Format a file with definition list support mdformat.file('example.md', extensions=['deflist']) # Or use CLI: mdformat --extensions deflist example.md
Debug
Known issues
gotchaThe plugin automatically adds definition list support to mdformat, but you must explicitly include 'deflist' in the extensions list when calling mdformat API or CLI.
fix
Use `mdformat.file('file.md', extensions=['deflist'])` or `mdformat --extensions deflist file.md`.
affects: all
gotchamdformat-deflist requires Python >=3.10. Older Python versions will fail to install.
fix
Upgrade Python to 3.10 or later.
affects: 0.1.0 - 0.1.4
gotchaThe plugin is based on markdown-it-deflist, which may produce different output than other definition list parsers. Ensure your markdown uses the standard markdown-it syntax.
fix
Follow the markdown-it-deflist syntax: colon-prefixed terms followed by indented definitions.
affects: all
Errors
Common errors & fixes
ImportError: cannot import name 'deflist' from 'mdformat'
You cannot import 'deflist' directly from mdformat; it's a plugin that is automatically registered when installed.
fix
Simply install mdformat-deflist and use mdformat with the 'deflist' extension: `mdformat.file('file.md', extensions=['deflist'])`.
mdformat.exceptions.MdformatError: Plugin 'deflist' not found
The mdformat-deflist package is not installed.
fix
Run `pip install mdformat-deflist` and ensure it's in your environment.
SyntaxError: invalid syntax (while parsing definition list)
The definition list syntax in your markdown file does not conform to the expected markdown-it-deflist format.
fix
Ensure terms are on a line starting with colon and space, and definitions are indented by at least one space on subsequent lines. Example:
Term 1
: Definition 1
Term 2
: Definition 2
Upgrade
Version history
0.1.4latest on PyPI · released Oct 19, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
mdformat-deflist — pip install mdformat-deflist · libregistry