Redocly / Redocly/redoc

Markdown description: Some nested headings don't display properly

Open
#2,194 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

investigation
Dominant language
TypeScript
Stars
25.9k
Forks
2.4k
Avg merge
13h 10m
Merged PRs (30d)
4

Description

Describe the bug
Markdown nested headings in the info description don't display properly.

Expected behavior
When creating heading and subheading like
#Our data models ###ChargePointOperator
I expect to see a heading named Our data models and a smaller subheading ChargePointOperator.

Minimal reproducible OpenAPI snippet(if possible)
Following is the first part of the OpenAPI schema, the relevant stuff should be in here.
{"openapi":"3.0.2","info":{"title":"Charge Point API Docs","description":"# QaaS Charge Points - What does it do?\nIt automates as far as possible the process of\nsubmitting charge amounts of electric vehicles for consideration for\nthe THG quote by the Umweltbundesamt (German Environment Agency). You\ncan easily map all your charge point operators, charge points and\ncharge records to unique entities in our database and administrate it\nvia our API. We then take over the communication with the\nUmweltbundesamt, relay the status to you as well as the trading of the\nCO2 allowances.\n\n# Our data models\n\n## ChargePointOperator\nA ChargePointOperatoris an entity that operates any number ofChargePoints. These operators may be a part of your organization or a 3rd party. For 3rd parties you are recommended to provide the timestamp of when you and the partner signed the terms of agreement. This has to be provided as a UTC timestamp, e.g. 2022-01-01T12:34:56Z. \n\n

Screenshots
This is the source:
Bildschirmfoto 2022-10-24 um 10 39 01

This is what I see when creating the above mentioned source:
Bildschirmfoto 2022-10-24 um 10 39 11

What's interesting is that it breaks the heading ChargePointOperatorin two parts and cuts it off behind ChargePoint and puts Operator in a new line. Before that it duplicates the heading in the correct format and puts it in front.

Additional context
Add any other context about the problem here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in Redoc with the provided OpenAPI snippet and its Markdown info description. Inspect the Markdown heading rendering path, then verify that nested headings display once, retain their hierarchy, and do not wrap or duplicate the ChargePointOperator heading.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.