Skip to content

Can’t get proper paragraphs in Markdown in descriptions #3867

@michalrus

Description

@michalrus
Q A
Bug or feature request? Bug
Which Swagger/OpenAPI version? 2.0
Which Swagger-UI version? 3.4.1
How did you install Swagger-UI? From the dist/ directory in the repo.
Which browser & version? Chromium 62.0.3202.75
Which operating system? NixOS 17.09

Demonstration API definition

choose-one: "irrelevant, applies to all / we’re using JSON autogenerated from Haskell / NDA / I don’t know the format to create a minimal repro by hand"

Configuration (browser query string, constructor, config.yaml)

"irrelevant as well, applies to all"

Expected Behavior

Each time there is "Par 1\n\nPar 2" in a "description" field, we should get proper paragraphs. Paragraph spacing should be greater than 0.

Current Behavior

There’s no space between "Par 1" and "Par 2", they look as if the "description" contained just "Par 1\nPar 2". The <p/>s are indeed generated correctly, but their margin is 0.

Possible Solution

Fix <p/>’s CSS.

Also: we’re now using "\n\n\xe005e\n\n" instead of just \n\n as a workaround to add artificial spacing between paragraphs. But this is crazy.

Context

Describing more complex stuff often requires more than one paragraph. And if they are not spaced with some kind of vertical whitespace (<p/> margin), it’s very unreadable.

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