bootstrap-toc
bootstrap-toc copied to clipboard
Fix toc with one element
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.
That is caused by getTopLevel() function, that in this case returns 1 as the top level.
Created a PR here: https://github.com/afeld/bootstrap-toc/pull/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.