Skip to content

Conversation

@reakaleek
Copy link
Member

@reakaleek reakaleek commented Jan 8, 2026

Closes #2434

Problem

Stepper steps in included snippets always appeared as h2 in the table of contents, regardless of the parent document's heading structure.

Solution

When processing included snippets, we adjust stepper step heading levels based on the preceding heading in the parent document. Stepper steps that defaulted to h2 are adjusted to be one level deeper than the preceding heading.

Example:

## Main Section (h2)
:::{include} _snippets/stepper.md
:::

Stepper steps now correctly become h3 instead of h2.

Changes

  • Added IsStepperStep flag to distinguish stepper steps from regular headings
  • Adjusted stepper step levels when merging snippet ToC items
  • Regular headings in snippets are preserved (not adjusted)

@reakaleek reakaleek added the fix label Jan 8, 2026
@reakaleek reakaleek self-assigned this Jan 8, 2026
@reakaleek reakaleek marked this pull request as ready for review January 8, 2026 23:21
@reakaleek reakaleek requested a review from a team as a code owner January 8, 2026 23:21
@reakaleek reakaleek requested a review from Mpdreamz January 8, 2026 23:21
@reakaleek reakaleek merged commit e9f19a2 into main Jan 9, 2026
31 of 32 checks passed
@reakaleek reakaleek deleted the feature/fix-stepper-headings branch January 9, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stepper title sizes are not working when the stepper is imported through a snippet

4 participants