Table of Contents Indenting #458

Closed
opened 2026-02-04 20:11:38 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @Ethanb00 on GitHub (Oct 3, 2017).

I'm calling this a bug request, but I'm not sure if it is actually a bug

For Bug Reports

  • BookStack Version: 18.1
  • PHP Version: PHP7
Expected Behavior

On the left-hand table of contents, I would expect a standard way that headers stack under each other. Whether it is a static indent corresponding to the number of #s or whether it is indented on the basis of "this section has fewer #s than the last section so it goes in one indent value"

Current Behavior

Presently, I had a section with a 2 # header (i.e. ## Title), followed by a 6 hash header (i.e. ######) in a page with several other headers. However, the table of contents did not accurately reflect the page structure. See image:
2017-10-03 12_37_08-on-boarding procedure _ techops docs

As you can see the section titled "Preceding the creation....." should fall below (i.e. indent under) "Documenting Account Information"

I hope that makes sense. I was having trouble explaining this so I am happy to try to clarify if needed.

Thank you!

Originally created by @Ethanb00 on GitHub (Oct 3, 2017). *I'm calling this a bug request, but I'm not sure if it is actually a bug* ### For Bug Reports * BookStack Version: 18.1 * PHP Version: PHP7 ##### Expected Behavior On the left-hand table of contents, I would expect a standard way that headers stack under each other. Whether it is a static indent corresponding to the number of #s or whether it is indented on the basis of "this section has fewer #s than the last section so it goes in one indent value" ##### Current Behavior Presently, I had a section with a 2 # header (i.e. ## Title), followed by a 6 hash header (i.e. ######) in a page with several other headers. However, the table of contents did not accurately reflect the page structure. See image: ![2017-10-03 12_37_08-on-boarding procedure _ techops docs](https://user-images.githubusercontent.com/5893479/31148768-c06c6a12-a85b-11e7-87d7-da366d732c21.png) As you can see the section titled "Preceding the creation....." should fall below (i.e. indent under) "Documenting Account Information" I hope that makes sense. I was having trouble explaining this so I am happy to try to clarify if needed. Thank you!
OVERLORD added the 🔍 Pending Validation label 2026-02-04 20:11:38 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jun 16, 2019):

Hi @Ethanb00,
Sorry it's taken 20 months for a response 😅.

The previous logic for shifting headers (When only smaller ones were used) was off. Now fixed with a test to cover. Will be in the next release.

@ssddanbrown commented on GitHub (Jun 16, 2019): Hi @Ethanb00, Sorry it's taken 20 months for a response :sweat_smile:. The previous logic for shifting headers (When only smaller ones were used) was off. Now fixed with a test to cover. Will be in the next release.
Author
Owner

@Ethanb00 commented on GitHub (Jun 17, 2019):

I know how it goes sometimes! Thanks for the fix! Cheers.

@Ethanb00 commented on GitHub (Jun 17, 2019): I know how it goes sometimes! Thanks for the fix! Cheers.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#458