fix: fix loadSider false render structure issue by Koooooo-7 · Pull Request #2470 · docsifyjs/docsify
Summary
Enhance fix #519 .
Main fix
When the loadSidebar=false, it uses the toc to render auto-generated sidebar.
But it puts the children nodes contents out of the parent node <li> block, which is mismatch the behavior with loadSidebar=true.
Minor changes
Refine the sidebar render part to always trigger by _renderMain callback instead of mess it in #renderMain.
Now, the renderSidebar has the consistency that always being a callback after #renderMain no matter it load on loadSidebar=true/false.
Related issue, if any:
What kind of change does this PR introduce?
Bugfix
For any code change,
- Related documentation has been updated, if needed
- Related tests have been added or updated, if needed
Does this PR introduce a breaking change?
Yes
No
Tested in the following browsers:
- Chrome
- Firefox
- Safari
- Edge