diff --git a/docs/devel/qapi-code-gen.rst b/docs/devel/qapi-code-gen.rst index ff7b74bdb2..6386b58881 100644 --- a/docs/devel/qapi-code-gen.rst +++ b/docs/devel/qapi-code-gen.rst @@ -1007,8 +1007,9 @@ A "Since: x.y.z" tagged section lists the release that introduced the definition. An "Example" or "Examples" section is automatically rendered entirely -as literal fixed-width text. In other sections, the text is -formatted, and rST markup can be used. +as literal fixed-width text. "TODO" sections are not rendered at all +(they are for developers, not users of QMP). In other sections, the +text is formatted, and rST markup can be used. For example:: diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py index d791b59492..8f3b9997a1 100644 --- a/docs/sphinx/qapidoc.py +++ b/docs/sphinx/qapidoc.py @@ -268,6 +268,9 @@ def _nodes_for_sections(self, doc): """Return list of doctree nodes for additional sections""" nodelist = [] for section in doc.sections: + if section.name and section.name == 'TODO': + # Hide TODO: sections + continue snode = self._make_section(section.name) if section.name and section.name.startswith('Example'): snode += self._nodes_for_example(section.text)