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

Better current level handling #7

Merged
merged 2 commits into from
Sep 23, 2024
Merged

Better current level handling #7

merged 2 commits into from
Sep 23, 2024

Conversation

mattheu
Copy link
Member

@mattheu mattheu commented Sep 23, 2024

There is a problem with the way maxLevel is working right now - I have set it to "2" but I'm still seeing H3s.

The reason for this is that the top level heading we get from get_header_hierarchy is h2. So in this case... we need to set current level to '2' in order for the maxLevel attribute to work correctly.

I've built some functionality to check for the highest level tag in the content, and set the current level to this.

@mattheu mattheu merged commit f996864 into main Sep 23, 2024
@mattheu mattheu deleted the current-level-handling branch September 23, 2024 11:35
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