Skip to content

Indented HTML comments are not working in SUMMARY.md. #2200

@your-diary

Description

@your-diary

Problem

Here's a minimal reproducible example content of src/SUMMARY.md:

# Summary - [Chapter 1](./chapter_1.md) - [Chapter 1.1](./chapter_1_1.md) <!--   - [Chapter 1.2](./chapter_1_2.md)  - [Chapter 2](./chapter_2.md)  -->

Though Chapter 2 is commented out, it appears in the sidebar and the corresponding empty .md file is created by mdbook:

Screenshot 2023-09-22 at 14 52 57

Steps

No response

Possible Solution(s)

Current workaround is to un-indent the comment:

# Summary - [Chapter 1](./chapter_1.md) - [Chapter 1.1](./chapter_1_1.md) <!--   - [Chapter 1.2](./chapter_1_2.md)  - [Chapter 2](./chapter_2.md)  -->

Notes

No response

Version

mdbook v0.4.34 

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-SummaryArea: The summary page, organization of pages.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