# DiscoTOC - automatic table of contents

**URL:** https://meta.discourse.org/t/discotoc-automatic-table-of-contents/111143
**Category:** Theme component
**Tags:** official, disco-toc
**Created:** [9 maart 2019 om 05:36 UTC](https://meta.discourse.org/t/discotoc-automatic-table-of-contents/111143 "2019-03-09T05:36:22Z")
**Posts on this page:** 1
**Showing post:** 330

<div class="post-metadata">

### Author: ![craigconstantine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/craigconstantine/32/511195_2.png) [@craigconstantine](https://meta.discourse.org/u/craigconstantine)
#### Post date: [2 februari 2022 om 14:33 UTC](https://meta.discourse.org/t/discotoc-automatic-table-of-contents/111143/330 "2022-02-02T14:33:26Z")

</div>

I have posts that have extra DIVs in their bodies. For example, [On Storytelling - Workbench - Podtalk Community](https://forum.podcaster.community/t/on-storytelling/268)

The DIV which triggers the TOC generation is inside a DIV… and TOC notices that. But other headings, inside DIVs, don’t seem to get noticed by TOC.

 ![Screen Shot 2022-02-02 at 09.45.01](https://global.discourse-cdn.com/meta/original/3X/9/b/9bbeff81605bfa87e185c25bbf0125e392e47c85.jpeg)

…not the best screenshot. That’s an H2 in an arbitrary/just-for-styling DIV which does not appear in the TOC.

…not shown is the `<div ` that triggers the TOC, which is inside the DIV with the crazy attribute/value pair…

* * *

updated hours later to add: Maybe just “:scope h1,” etc rather than requiring the headings be immediate children of the scope?

 ![Screen Shot 2022-02-02 at 13.39.55](https://global.discourse-cdn.com/meta/original/3X/0/b/0b49493e84c6b4227fa760328cae54cddca57496.png)

…also, this was mentioned in March '21, [DiscoTOC - automatic table of contents - #255](https://meta.discourse.org/t/discotoc-automatic-table-of-contents/111143/255)

---

_[View the full topic](https://meta.discourse.org/t/discotoc-automatic-table-of-contents/111143)._
