sphinx.ext.todo – 对 todo 条目的支持

模块作者:Daniel Bültmann

在版本 0.5 中添加。

当使用此扩展时,有两个额外的指令

.. todo::

像使用 note 指令一样使用此指令。

仅当 todo_include_todosTrue 时,它才会显示在输出中。

Added in version 1.3.2: 此指令支持 class 选项,该选项确定 HTML 输出的 class 属性。 如果未指定,则 class 默认为 admonition-todo

.. todolist::

如果 todo_include_todosTrue,则此指令将被整个文档中所有 todo 指令的列表替换。

这些可以如下配置。

配置

todo_include_todos
类型:
布尔值
默认值:
False

如果此项为 True,则 todotodolist 会产生输出,否则它们不产生任何输出。

todo_emit_warnings
类型:
布尔值
默认值:
False

如果此项为 True,则 todo 会为每个 TODO 条目发出警告。

在版本 1.5 中添加。

类型:
布尔值
默认值:
False

如果此项为 True,则 todolist 会产生不带文件路径和行的输出。

在版本 1.4 中添加。

autodoc 提供了以下附加事件

todo-defined(app, node)

在版本 1.5 中添加。

当定义 todo 时发出。 node 是定义的 sphinx.ext.todo.todo_node 节点。