diplodoc-platform / diplodoc-platform/cli

В оглавлении заголовки h4 отображаются на одном уровне с h3

Open
#1,139 0 comments 0 reactions 0 assignees View on GitHub
bug from_support
Dominant language
TypeScript
Stars
123
Forks
51
Avg merge
10h 50m
Merged PRs (30d)
38

Description

### Package version
4.57.11
### Node version
v23.8.0
### Platform

### What steps will reproduce the bug?
Создать заголовки:

## Заголовок h2
### Заголовок h3
#### Заголовок h4

### What is the expected behavior?
В оглавлении справа h3 и h4 будут на разных уровнях. Или h4 не будет отображаться.
### What do you see instead?
В оглавлении справа h3 и h4 будут на одном уровне.
### Additional information
Есть проблема с заголовками: в оглавлении статьи отображаются все уровни (х2-х4). Причем само оглавление поддерживает только два уровня. То есть х3 и х4 сливаются и выводятся там на одном уровне. Например,
https://help.mindbox.ru/docs/email-and-mobile-confirmation

«После включения» — х2
«Как выглядят контакты» — х3
«Основной и ожидающий подтверждения контакты» — х4, но в оглавлении выводится на уровне х3

Хотелось бы иметь возможность регулировать оглавление, если не на уровне статьи, то хотя бы на уровне проекта, чтобы только х2 и х3 были, а то полотно получается.

Contributor guide

Open the contributing guide

Research direction

No source files, tests, or entry points are named. Reproduce the issue with nested h2, h3, and h4 headings and inspect the table of contents behavior shown in the linked example; done should define whether h4 headings are nested correctly or excluded, and how the requested scope is configured.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.