[TOC] display incorrect in preview mode

Steps to reproduce

In preview mode, as long as theheading is not continuous, the [TOC] hierarchy does not seem to work properly.

Expected result

The hierarchy can be displayed properly even if the heading is not continuous.

Actual result

Please see the picture below, it is very visual.

[TOC]

# Example H1

### Heading H3

#### Heading H4

1

[TOC]

# Example H1

## Heading H2

### Heading H3

#### Heading H4

2

Environment

  • Operating system: Windows 10 x64
  • Version: v0.15.9

Additional information

I am very clear that this situation appeared in the last two days, of course I found it today. And I am not sure if this is the case in 0.15.8.

The toc plugin is not part of core obsidian. You need to contact the author of this plugin via their github