Skip to content

[v2] Table of content does not render links when H1 is missing #1311

Open
@janssen-io

Description

@janssen-io

Description

When the page does not contain a level 1 heading (# My Heading), the table of contents renders the markdown links as plain text.

Details

Only present in SilverBullet v2 (tested on 771c160)

Steps to reproduce

  1. Create a new page
  2. Enter the following markdown
## H2 - 1
## H2 - 2
## H2 - 3
  1. Reload the system or page
  2. The table of contents now shows the following as plain text:
  * [[index#H2 - 1|H2 - 1]]
  * [[index#H2 - 2|H2 - 2]]
  * [[index#H2 - 3|H2 - 3]]
  1. Add an H1 above the first H2:
# H1
### H2 - 1
### H2 - 2
### H2 - 3
  1. Now the table of contents renders the links nicely
 * H1
   * H2 - 1
   * H2 - 2
   * H2 - 3

Notes

  • Putting the H1 below one of the H2's will render only the H1 and the headings below it nicely.
  • Edge (v1) renders the TOC nicely, even without a level 1 heading present.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingv2

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions