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

[BUG] Weird behavior with h2 headers when no h1 is present #2515

Closed
nicfv opened this issue Mar 5, 2024 · 0 comments
Closed

[BUG] Weird behavior with h2 headers when no h1 is present #2515

nicfv opened this issue Mar 5, 2024 · 0 comments
Labels
bug Functionality does not match expectation

Comments

@nicfv
Copy link

nicfv commented Mar 5, 2024

Search terms

on, this, page, h1, h2, markdown, header, table, of, contents, readme

Expected Behavior

I do not have an h1 header in my README.md file, but several h2 headers. I expected them all to be in the same "level" in the Table Of Contents aka. On This Page. However, my first h2 header is at a higher level than the rest of them. See the screenshot below for what I mean.

Actual Behavior

In "On This Page", the first h2 header is shown as the main header with the rest of the h2 headers as subheaders below it.

Steps to reproduce the bug

  1. Create a typescript / typedoc project as normal
  2. Do not install any plugins or do anything special
  3. In the main readme file, remove the h1 # header
  4. Add multiple h2 ## headers (see my example code in extra)
  5. Build and serve the typedoc website

Environment

  • Typedoc version: 0.25.10
  • TypeScript version: 5.3.3
  • Node.js version: 20.11.1
  • OS: Ubuntu 22.04

Extra

td.png

Some text

## header one

Some more text

## header two

Some even more text

## header three

Goodbye
@nicfv nicfv added the bug Functionality does not match expectation label Mar 5, 2024
@Gerrit0 Gerrit0 closed this as completed in edd6b6b Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality does not match expectation
Projects
None yet
Development

No branches or pull requests

1 participant