There is a difference at the way DOC sections are output with the include mode. Handle such difference properly.
Unified · Split
| @@ -315,12 +315,12 @@ class RestFormat(OutputFormat): · 314 unmodified lines | |||
| 315 | if section in self.nosymbol: | 315 | if section in self.nosymbol: |
| 316 | continue | 316 | 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]) |