Skip to content

Table of Contents generated incorrectly for headers embedded in lists. #380

@colewerner

Description

@colewerner

Below is an example where the Table of Contents is generated incorrectly when there are headers embedded within lists:

# Title

[TOC]

## Section 1

1. List Item 1

    ### Subsection 1
    Explanation 1

2. List Item 2

    ### Subsection 2
    Explanation 2

## Section 2

## Section 3

Below is the output for the above markdown. You can see that Subsection 1 and 2 are actually put under Section 3 instead of Section 1 in the table of contents.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions