Skip to content

Prioritize headings inside main element#88

Merged
daun merged 4 commits into
mainfrom
fix/heading-selector-scope
May 7, 2026
Merged

Prioritize headings inside main element#88
daun merged 4 commits into
mainfrom
fix/heading-selector-scope

Conversation

@daun
Copy link
Copy Markdown
Member

@daun daun commented May 5, 2026

Description

  • Add the ability to try multiple heading selectors in order
  • This was required in a recent project without control over markup to properly handle some weird markup
  • I figured this would also be a good defensive default: first main h1, then h1
  • No breaking change: it falls back to the previous version; strings are still accepted as a user option

Checks

  • The PR is submitted to the main branch
  • The code was linted before pushing (npm run lint)
  • All tests are passing (npm run test)
  • New or updated tests are included
  • The documentation was updated as required

daun added 4 commits May 5, 2026 13:16
Signed-off-by: Philipp Daun <post@philippdaun.net>
Signed-off-by: Philipp Daun <post@philippdaun.net>
Signed-off-by: Philipp Daun <post@philippdaun.net>
Signed-off-by: Philipp Daun <post@philippdaun.net>
@daun daun requested a review from a team May 7, 2026 14:04
@daun daun merged commit 4895b97 into main May 7, 2026
1 check passed
@daun daun deleted the fix/heading-selector-scope branch May 7, 2026 16:51
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.

2 participants