Skip to content
This repository was archived by the owner on Aug 10, 2026. It is now read-only.
This repository was archived by the owner on Aug 10, 2026. It is now read-only.

Fix toc with one element #54

Open
Open

Description

@sasanikolic90

The TOC structure is wrongly built when there is only one heading in the toc scope. I think the second ul tag is not necessary.

toc-one-heading-issue

That is caused by getTopLevel() function, that in this case returns 1 as the top level.

Activity

  1. sasanikolic90 commented on Feb 19, 2019

    @sasanikolic90
    Author

    Created a PR here: #55

    Not sure if this is actually correct, since I changed some core functionality here. In fact, I totally opted out h1 titles and made the top level default to 2. This fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions