Table of Contents doesn't respect Headings after Subheadings

Describe the bug
After writing a Subheading (h3) in a page, any successive Heading (h2) will show in the Table of Contents as Subheadings of the same Heading. (Successive Subheadings to the Heading are nested further). This will happen if you create a ToC before or after doing this.

To Reproduce
Steps to reproduce the behavior:

  1. Write an Heading
  2. Write a Subheading
  3. Write another Heading

Expected behavior
The Heading in the ToC shows correctly indented headings.

System Information:

  • OS: e.g. Windows 10
  • Device Manufacturer/Model: Asus
  • Anytype Version: e.g. 0.24.0
10 Likes

I’m not able to reproduce this on Linux.
Created a “Table of contents” before, than added titles and headings. Worked fine.
Also created another “Table of contents” after that. Showing the same.

I’m not talking about Titles (h1), I’m talking about only Headings (h2) and Subheadings (h3). Try h2 - h3 - h2, not h2 - h3 - h1. Putting a Title ‘resets’ the indentation and like you showed works as intended.

2 Likes

Got it. Deleting the titles in between then shows the same problem on Linux.

2 Likes

I have the same problem, fix would be much apprechiated! :slight_smile:
(also on Windows)