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

Find all subheaders between headers regardless if they are siblings or children #107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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