diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-01-15 00:49:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-15 00:49:31 +0100 |
commit | 8d60f5a34940238383e13b9a63d9d2a1af6e21bb (patch) | |
tree | 6480c7f8590825fff528a1ee93dcc0270cb37f6b /doc/tools/makerst.py | |
parent | eb382f1bdc240c7f81b3a677a86fe4aed4f420e9 (diff) | |
parent | 3c8abbc4bf6d2e7b6706468f6af3eb4b270ab7bf (diff) |
Merge pull request #35132 from Calinou/doc-description-below-brief
doc: Move the class description to be just below the brief description
Diffstat (limited to 'doc/tools/makerst.py')
-rwxr-xr-x | doc/tools/makerst.py | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index 91240e9550..4b07bf00ee 100755 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -393,15 +393,22 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S f.write(make_type(child, state)) f.write("\n\n") - # Category - if class_def.category is not None: - f.write('**Category:** ' + class_def.category.strip() + "\n\n") - # Brief description - f.write(make_heading('Brief Description', '-')) if class_def.brief_description is not None: f.write(rstize_text(class_def.brief_description.strip(), state) + "\n\n") + # Class description + if class_def.description is not None and class_def.description.strip() != '': + f.write(make_heading('Description', '-')) + f.write(rstize_text(class_def.description.strip(), state) + "\n\n") + + # Online tutorials + if len(class_def.tutorials) > 0: + f.write(make_heading('Tutorials', '-')) + for t in class_def.tutorials: + link = t.strip() + f.write("- " + make_url(link) + "\n\n") + # Properties overview if len(class_def.properties) > 0: f.write(make_heading('Properties', '-')) @@ -494,18 +501,6 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S f.write('\n\n') - # Class description - if class_def.description is not None and class_def.description.strip() != '': - f.write(make_heading('Description', '-')) - f.write(rstize_text(class_def.description.strip(), state) + "\n\n") - - # Online tutorials - if len(class_def.tutorials) > 0: - f.write(make_heading('Tutorials', '-')) - for t in class_def.tutorials: - link = t.strip() - f.write("- " + make_url(link) + "\n\n") - # Property descriptions if any(not p.overridden for p in class_def.properties.values()) > 0: f.write(make_heading('Property Descriptions', '-')) |