Expand description
MkDocs/Python-Markdown Definition Lists extension support
This module provides support for the Python-Markdown Definition Lists extension, which allows creating definition lists with terms and their definitions.
§Syntax
Term 1
: Definition for term 1
Term 2
: Definition for term 2
Continuation of the definition
Term with multiple definitions
: First definition
: Second definition§Format Requirements
- Term appears on its own line (no leading whitespace required for the term)
- Definition starts with
:followed by whitespace (typically 3 spaces after:) - Multiple definitions for a term use separate
:lines - Continuation lines are indented (typically 4 spaces)
§MkDocs Material Specifics
MkDocs Material supports definition lists via the Python-Markdown Definition Lists extension, which is enabled by default in the Material theme.
§References
Structs§
- Definition
- A single definition within a definition list entry
- Definition
Entry - Parsed definition list entry
Functions§
- could_
be_ term_ line - Check if a line could be a term (precedes a definition)
- extract_
definition_ lists - Extract all definition list entries from content
- is_
definition_ continuation - Check if a line is a definition continuation (indented after a definition)
- is_
definition_ line - Check if a line is a definition (starts with
:followed by whitespace) - is_
in_ definition_ marker - Check if a position in a line is within a definition marker