question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can’t get proper paragraphs in Markdown in descriptions

See original GitHub issue
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.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
shockeycommented, Aug 7, 2019

Looks like #5520 solved this 🎉

Input

swagger: "2.0"
paths:
  /:
    get:
      description: "Par 1\n\nPar 2"

Output

image
0reactions
webroncommented, Aug 6, 2019

Okay, I take it back. Sorry about that. There is an issue and we’re looking into it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Basic Syntax - Markdown Guide
Unless the paragraph is in a list, don't indent paragraphs with spaces or tabs. Note: If you need to indent paragraphs in the...
Read more >
How do I use markdown in Description - Atlassian Community
Solved: First time using a next gen project. I don't seem to be able to use any markdown or other text based formatting....
Read more >
Markdown Syntax Documentation - Daring Fireball
A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any...
Read more >
Markdown Syntax - dotCMS
To create paragraphs in Markdown, use one or more lines of consecutive text followed by one or more blank lines. Note: If you...
Read more >
Handbook Markdown Guide - GitLab
In most of GitLab text areas you'll find markdown support. ... Regular paragraphs are obtained by just writing text lines.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found