redoc icon indicating copy to clipboard operation
redoc copied to clipboard

Markdown description: Some nested headings don't display properly

Open jpheuz opened this issue 4 years ago • 2 comments

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.

jpheuz avatar Oct 24 '22 09:10 jpheuz

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.

AlexVarchuk avatar Oct 24 '22 15:10 AlexVarchuk

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.

jpheuz avatar Dec 06 '22 11:12 jpheuz