dokka icon indicating copy to clipboard operation
dokka copied to clipboard

Support markdown line breaks in KDoc

Open TWiStErRob opened this issue 3 years ago • 2 comments

Describe the bug Markdown-supported double-space forced line wraps are not rendered in Dokka.

To Reproduce

/**
 * Something.  
 * Something else.
 */
fun f() { }

Note the two spaces after "Something.", highlight the code block to see them.

Expected behaviour Rendered as HTML:

Something.<br>
Something else.

Screenshots Currently this seems to be not supported.

Dokka configuration default / any

Installation

  • Operating system: Windows
  • Build tool: Gradle 7.6
  • Dokka version: 1.8.20 beta

Additional context https://daringfireball.net/projects/markdown/syntax#p describes how line breaking should work in markdown.

https://youtrack.jetbrains.com/issue/KTIJ-6702/KDoc-Dokka-allow-for-newlines-line-breaks-inside-paragraphs#focus=Comments-27-6792193.0-0

Here's how it works on GitHub:

> Something.  
> Something else.

rendered as:

Something.
Something else.

Are you willing to provide a PR? This seems like a complex one to me, because I'm not familiar with the Dokka codebase's inner workings.

TWiStErRob avatar Jan 20 '23 10:01 TWiStErRob

@IgnatBeresnev why did you flag this as upstream?

TWiStErRob avatar Nov 12 '23 10:11 TWiStErRob

Do you have any updates on this issue? Currently, I'm having the same problem and would like to have some sort of markdown to do line breaks.

Mauker1 avatar Feb 02 '24 15:02 Mauker1