Module

plugins.task_lists

Task list plugin for Patitas.

Adds support for checkbox task lists.

Usage:

>>> md = create_markdown(plugins=["task_lists"])
>>> md("- [ ] Unchecked
  • Checked")
'<ul><li class="task-list-item"><input type="checkbox" disabled> Unchecked</li>...'

Syntax:

  • Unchecked task
  • Checked task
  • Also checked (uppercase)

Works with ordered lists too:

  1. First task
  2. Second task

Notes:

  • Checkboxes are rendered disabled by default
  • The ListItem node has acheckedfield (True/False/None)
  • Task list support is enabled by default in core parser

Thread Safety:

This plugin is stateless and thread-safe.

Classes

TaskListPlugin 1
Plugin for task list checkbox support. Task lists are built into the core parser via the ListItem.…

Plugin for task list checkbox support.

Task lists are built into the core parser via the ListItem.checked field. Enable via Markdown(plugins=["task_lists"]).

Note: The actual parsing is controlled by ParseConfig.task_lists_enabled, which is set by the Markdown class based on the plugins list.

Methods

name 0 str
property
def name(self) -> str
Returns
str