ToC not working when headers are inside a div?

It depends on what you try to achieve with your other HTML content.

I crosspost a potential workaround: TOC doesn't work when wrapped with HTML tags - #2 by Canapin

2 Likes