Skip to content

Commit 9235ec5

Browse files
mchehabJonathan Corbet
authored andcommitted
scripts/kernel-doc.py: properly handle out_section for ReST
There is a difference at the way DOC sections are output with the include mode. Handle such difference properly. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/935d00c6a7c45b25a8be72fad6183fe5a8476cd2.1744106242.git.mchehab+huawei@kernel.org
1 parent 408269a commit 9235ec5

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

scripts/lib/kdoc/kdoc_output.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,12 +315,12 @@ def out_section(self, args, out_docblock=False):
315315
if section in self.nosymbol:
316316
continue
317317

318-
if not self.out_mode == self.OUTPUT_INCLUDE:
319-
if out_docblock:
318+
if out_docblock:
319+
if not self.out_mode == self.OUTPUT_INCLUDE:
320320
self.data += f".. _{section}:\n\n"
321-
322-
if not self.symbol:
323321
self.data += f'{self.lineprefix}**{section}**\n\n'
322+
else:
323+
self.data += f'{self.lineprefix}**{section}**\n\n'
324324

325325
self.print_lineno(section_start_lines.get(section, 0))
326326
self.output_highlight(sections[section])

0 commit comments

Comments
 (0)