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

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/lib/kdoc/kdoc_output.py+4−4
@@ -315,12 +315,12 @@ class RestFormat(OutputFormat): · 314 unmodified lines
315 if section in self.nosymbol:315 if section in self.nosymbol:
316 continue316 continue
317 317
318 if not self.out_mode == self.OUTPUT_INCLUDE:318 if out_docblock:
319 if out_docblock:319 if not self.out_mode == self.OUTPUT_INCLUDE:
320 self.data += f".. _{section}:\n\n"320 self.data += f".. _{section}:\n\n"
321
322 if not self.symbol:
323 self.data += f'{self.lineprefix}**{section}**\n\n'321 self.data += f'{self.lineprefix}**{section}**\n\n'
322 else:
323 self.data += f'{self.lineprefix}**{section}**\n\n'
324 324
325 self.print_lineno(section_start_lines.get(section, 0))325 self.print_lineno(section_start_lines.get(section, 0))
326 self.output_highlight(sections[section])326 self.output_highlight(sections[section])