linux/Documentation/sphinx
Karl Mehltretter 86dbc298d1 docs: kerneldoc.py: preserve headings in kernel-doc output
kerneldoc.py parses extracted ReST into a detached section node while
retaining the surrounding title hierarchy. Docutils 0.21.2 silently drops
affected sections; 0.22.4 reports:

  Documentation/networking/kapi:107:
  ../include/net/net_shaper.h:75:
  ERROR: A level 3 section cannot be used here.

The same issue drops three Xe DRM RAS headings already in mainline.

Use nested_parse_with_titles() to give kernel-doc output an independent
title hierarchy.

Fixes: 2404dad1f6 ("doc: Cope with the deprecation of AutoReporter")
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20261002230114.39651-1-kmehltretter@gmail.com>
2026-10-22 09:52:26 -06:00
..
templates docs: sphinx: remove SPDX/copyright comments from HTML output 2025-09-03 15:50:51 -06:00
automarkup.py docs: automarkup.py: Skip common English words as C identifiers 2026-01-27 10:35:57 -07:00
kernel_abi.py docs: bring some order to our Python module hierarchy 2025-11-18 09:22:40 -07:00
kernel_feat.py Documentation/sphinx/kernel_feat.py: use class directly 2025-11-21 10:32:30 -07:00
kernel_include.py docs: bring some order to our Python module hierarchy 2025-11-18 09:22:40 -07:00
kerneldoc-preamble.sty scripts: sphinx-pre-install: move it to tools/docs 2025-09-18 11:17:18 -06:00
kerneldoc.py docs: kerneldoc.py: preserve headings in kernel-doc output 2026-10-22 09:52:26 -06:00
kfigure.py docs: sphinx: add missing SPDX tags 2025-06-25 12:39:17 -06:00
maintainers_include.py docs: maintainers_include: fix entry names 2026-07-16 15:45:12 -06:00
min_requirements.txt docs: sphinx: add missing SPDX tags 2025-06-25 12:39:17 -06:00
parser_yaml.py sphinx: parser_yaml.py: fix line numbers information 2025-08-12 07:47:31 +02:00
requirements.txt docs: sphinx: add missing SPDX tags 2025-06-25 12:39:17 -06:00
rstFlatTable.py docs: sphinx: add missing SPDX tags 2025-06-25 12:39:17 -06:00
translations.py docs: pt_BR: Add initial Portuguese translation 2026-02-23 14:16:07 -07:00