History

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.

Mauro Carvalho Chehab committed 1 year ago

Commit 9235ec51 parent 408269a1 file · +4 −4Browse files

Unified · Split

scripts/lib/kdoc/kdoc_output.py+4−4
@@ -315,12 +315,12 @@ class RestFormat(OutputFormat): · 314 unmodified lines
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])