Skip to content

Markdown headers in OpenApi description not rendered properly when using italic/bold in headers #2780

@MariusCorbiere

Description

@MariusCorbiere

Describe the bug
Markdown headers in OpenApi description field is not rendered properly when using italic or bold text. Headers are displayed twice, first with html tags visible and without the content, then properly. The sidenav shows only the malformatted titles, it breaks the navigation within the OpenApi specification.

Expected behavior
Headers should be displayed only once, properly formatted with the content under it, even if bold or italic text is used. Navigation with sidenav should work.

Minimal reproducible OpenAPI snippet(if possible)

{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "Example spec",
    "description": "# Header 1\n\n## Header 1.1 with **bold**\nSome content in section 1.1\n\n## Header 1.2 with _italic_\n Some more content in section 1.2"
  }
}

Screenshots
Here is the result after rendering

Image

Additional context
I am using Redoc 2.5.2 in an Angular application.
The rendering is good if italic/bold is not used in headers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions