Skip to content

Conversation

@BoPeng
Copy link

@BoPeng BoPeng commented Jun 22, 2018

I encountered a similar problem with #36. More specifically, I am adding TOCs to a bunch of jupyter notebooks whose headers are inside cells and have a structure like

cell -> h2
cell -> h3
cell -> h3
cell -> h2

tocify.js could not get the h3s because they are not children of h2. I checked the source code and find that this restriction is not really necessary so I modified the code to display all headers regardless if they are siblings or children.

The patch works but perhaps not using the best algorithm, but I would first like to know if there is any real reason for the restriction and if you are interested in merging the PR.

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

Successfully merging this pull request may close these issues.

1 participant