Skip to content

fix: correct heading level for Truthiness narrowing section#3581

Closed
sijie-Z wants to merge 1 commit into
microsoft:v2from
sijie-Z:fix/narrowing-heading-level
Closed

fix: correct heading level for Truthiness narrowing section#3581
sijie-Z wants to merge 1 commit into
microsoft:v2from
sijie-Z:fix/narrowing-heading-level

Conversation

@sijie-Z
Copy link
Copy Markdown

@sijie-Z sijie-Z commented Jun 5, 2026

Fixes microsoft/TypeScript#63531

I found the issue in packages/documentation/copy/en/handbook-v2/Narrowing.md at line 109.
The "Truthiness narrowing" section uses an H1 heading (#) instead of H2 (##), which breaks
the Table of Contents structure. All subsequent parallel narrowing concepts like "Equality
narrowing", "The in operator narrowing", "instanceof narrowing" etc. are incorrectly nested
under Truthiness narrowing in the TOC.

Changed # Truthiness narrowing to ## Truthiness narrowing to match the heading level of
other narrowing concepts in the same page.

Changed '# Truthiness narrowing' to '## Truthiness narrowing' to fix
the Table of Contents structure. The H1 heading was causing all
subsequent parallel narrowing concepts to be incorrectly nested under
Truthiness narrowing.

Fixes #63531
@MartinJohns
Copy link
Copy Markdown
Contributor

Duplicate of #3580.

@sijie-Z
Copy link
Copy Markdown
Author

sijie-Z commented Jun 5, 2026

Ah, didn't notice #3580 was submitted just a bit earlier! Closing this as a duplicate. Glad to see this layout bug getting fixed quickly anyway!

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.

Markdown heading level bug in Narrowing documentation

3 participants