Skip to content

Conversation

dvdmc
Copy link
Contributor

@dvdmc dvdmc commented Mar 28, 2025

🦟 Bug fix

No issue oppened

Summary

When creating a doc file with children, if the user writing forgets to add a break at the end of the file, the toctree is not separated from the text.

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Ensure that the appended toctree for childrens .md are separated from the parent .md text

Signed-off-by: David Morilla Cabello <[email protected]>
Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HI @dvdmc, thank you for your contribution.

Can you add two picture with the before and after of this patch.

Thank you

@github-project-automation github-project-automation bot moved this from Inbox to In review in Core development Mar 28, 2025
@dvdmc
Copy link
Contributor Author

dvdmc commented Mar 29, 2025

Sure! I will exemplify the steps to reproduce here:

  • If the .md of a page that has children has a break at the end as in this example:
    - [Sdformat](/api/sdformat/13/){.external}

The end of the intermediate file generated in the .tmp/harmonic/tutorials.md will look like this (without the \ before the `):

[Rest of the file]
- [Utils](/api/utils/2/tutorials.html){.external}
- [Sdformat](/api/sdformat/13/){.external} <- Here there is a break in the original tutorials.md file
\```{toctree}
:hidden:
:maxdepth: 1
:titlesonly:
Building your own robot <building_robot>
Moving the robot <moving_robot>
SDF worlds <sdf_worlds>
Sensors <sensors>
Actors <actors>
Understanding the GUI <gui>
Manipulating Models <manipulating_models>
Model Insertion from Fuel <fuel_insert>
Keyboard Shortcuts <hotkeys>
Spawn URDF <spawn_urdf>
\```
  • However, if the .md has not a break at the end, the generated file looks like:
[Rest of the file]
- [Utils](/api/utils/2/tutorials.html){.external}
- [Sdformat](/api/sdformat/13/){.external} \```{toctree}
:hidden:
:maxdepth: 1
:titlesonly:
Building your own robot <building_robot>
Moving the robot <moving_robot>
SDF worlds <sdf_worlds>
Sensors <sensors>
Actors <actors>
Understanding the GUI <gui>
Manipulating Models <manipulating_models>
Model Insertion from Fuel <fuel_insert>
Keyboard Shortcuts <hotkeys>
Spawn URDF <spawn_urdf>
\```

which messes up the whole toctree affecting the resulting web template.

Leaving additional spaces is not a problem.

Copy link
Contributor

@azeey azeey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

@azeey azeey dismissed ahcorde’s stale review August 27, 2025 21:14

Comment addressed

@azeey azeey merged commit 87f5aa0 into gazebosim:master Aug 27, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in Core development Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎵 harmonic Gazebo Harmonic
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants