Skip to content

[REQ][HTML] YAML multiline string formatting of descriptions should be translated to HTML #1716

@john3300

Description

@john3300

Is your feature request related to a problem? Please describe.

When using the literal style indicator (|) in a block scalar for a description, the formatting is ignored when inserted into HTML.

paths:
  /employees/{id}:
    get:
      description: |
        First line
        Second line

But right now this come out as First line Second line in the rendered HTML.

Describe the solution you'd like

When the literal style indicator is specified in the YAML, a <br> tag should be inserted at each newline when generating the HTML.

Additional context

Inserting <br> tags is how the Swagger UI does this and the formatting works great there.
Here's a good reference link on YAML multiline syntax.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions