There is a difference at the way DOC sections are output with the include mode. Handle such difference properly.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -315,12 +315,12 @@ class RestFormat(OutputFormat): · 314 unmodified lines | ||
| 315 | 315 | if section in self.nosymbol: |
| 316 | 316 | continue |
| 317 | 317 | |
| 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: | |
| 320 | 320 | self.data += f".. _{section}:\n\n" |
| 321 | − | |
| 322 | − if not self.symbol: | |
| 323 | 321 | self.data += f'{self.lineprefix}**{section}**\n\n' |
| 322 | + else: | |
| 323 | + self.data += f'{self.lineprefix}**{section}**\n\n' | |
| 324 | 324 | |
| 325 | 325 | self.print_lineno(section_start_lines.get(section, 0)) |
| 326 | 326 | self.output_highlight(sections[section]) |