Skip to content

Incorrect heading level indentation #2944

@kands-code

Description

@kands-code

Problem

As shown in the figure, subsec 1.2 should be at the same level as subsec 1.1, but in reality, subsec 1.2 is at the same level as sec 1 and sec 2, which is incorrect.

Image

Steps

  1. Create a brand new project: mkdir test && cd test && mdbook init --force
  2. Modify the contents of the chapter_1.md file
  3. Start preview: mdbook serve

File content as follows:

# Chapter 1

## sec 1

### subsec 1.1

#### subsubsec 1.1.1

### subsec 1.2

## sec 2

### subsec 2.1

Possible Solution(s)

No response

Notes

No response

Version

mdbook v0.5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: A bug, incorrect or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions