Skip to content

Fixed the generation of TOCs #102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 5, 2021
Merged

Conversation

javiereguiluz
Copy link
Collaborator

In some private tests we saw that a short TOC was displayed in two columns (as if it was a long TOC) whereas a slightly longer TOC was displayed in a single column.

The reason is that we were counting all TOC elements, instead of only the visible elements.

Please note that this PR is almost, but not entirely, correct. I had to hardcode the number of visible TOC levels at 2 (by far, the most common value in Symfony-related docs) but this should instead be obtained dynamically via the maxdepth TOC tree option in the RST contents.

Copy link
Member

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

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

Im happy with this. I opened an issue to resolve this TODO.

#106

@weaverryan
Copy link
Contributor

Thanks Javier!

@weaverryan weaverryan merged commit 9814e0c into symfony-tools:main Jul 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants