Skip to main content

Module mkdocs_definition_lists

Module mkdocs_definition_lists 

Source
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
DefinitionEntry
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