Redocly / redoc

📘 OpenAPI/Swagger-generated API Reference Documentation
https://redocly.github.io/redoc/
MIT License
23.57k stars 2.3k forks source link

Markdown description: Some nested headings don't display properly #2194

Open peterHeuz opened 2 years ago

peterHeuz commented 2 years ago

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 namedOur data modelsand a smaller subheadingChargePointOperator`.

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\nAChargePointOperatoris 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.

AlexVarchuk commented 2 years ago

Hi @peterHeuz.Please provide more reproducible examples(openapi snippet). I try to test your description but it seems it works regarding md syntax.

"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"

But in screenshots, you showed different data. 😢

Also, make sure you use the latest version of Redoc.

peterHeuz commented 1 year ago

Good morning @AlexVarchuk thank you for your rapid reply!

The issue still persists.

I updated right before I published the issue and am on 2.0.0.

Here are the first lines of the info.description field. It shows as the second screenshot above: It duplicates the heading into two headings where in the second heading the "Operator" of "ChargePointOperator" is cut off in a new line.

 "# 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## ChargePointOperator \nA `ChargePointOperator` is an entity that operates any number of `ChargePoint`s. 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## ChargePoint \nA `ChargePoint` is a single `ChargePoint` operated by one of\nyour previously created `ChargePointOperator`s. To increase the\nprobability of a seamless validation of your records with the\nUmweltbundesamt we recommend that you provide data for as many fields as\npossible. Besides the unique EVSE id you can specify the coordinates and\nthe operator name as registered with the Bundesnetzagentur.

Any advice or workaround would be really appreciated.