Skip to content

Heading not generated in toc if nested within 2 or more elements (but generated if nested within 1 element) #996

@ManasMadrecha

Description

@ManasMadrecha

Version

@nuxt/content: v1.14.0
nuxt: v2.15.7

Steps to reproduce

<!-- This generates Heading in TOC → -->

<div>

### Heading 

</div>



<!-- This DOES NOT generate Heading in TOC → -->

<div>
<div>

### Heading 

</div>
</div>



<!-- This DOES NOT generate Heading in TOC → -->

<details>
<summary>

### Heading 
</summary>

Some content here
</details>

What is Expected?

  1. Headings should be generated even if present inside some random Divs or at least if present inside summary tag. This is very common use-case while adding FAQs.

  2. Or, at least an option should be given in nuxt.config.js in content as to the depth/nesting of the elements up to which Headings will be generated even if written in them

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingv1Relevant for @nuxt/content v1

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions