Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix toc with one element #54

Open
sasanikolic90 opened this issue Feb 19, 2019 · 1 comment
Open

Fix toc with one element #54

sasanikolic90 opened this issue Feb 19, 2019 · 1 comment

Comments

@sasanikolic90
Copy link

sasanikolic90 commented Feb 19, 2019

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.

@sasanikolic90
Copy link
Author

sasanikolic90 commented Feb 19, 2019

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant