Kotlin / dokka

API documentation engine for Kotlin
https://kotl.in/dokka
Apache License 2.0
3.42k stars 405 forks source link

When kdoc has a codeblock containing `*/`, Dokka does not render any Kdoc for the property. #3846

Open adam-enko opened 3 days ago

adam-enko commented 3 days ago

Describe the bug

KDoc with a Markdown codeblock that contains */ results in nothing being rendered.

/**
 * Hello, welcome to the KDoc for the [a] property.
 *
 * ```
 * */
 * ```
 *
 * Thanks for visiting!
 */
 val a = ""

Expected behaviour

Dokka can handle */ inside of a code block, and will render the value.

Screenshots

To Reproduce

/**
 * Class defined in child project a
 */
class ChildProjectAClass {
  /**
   * Hello, welcome to the KDoc for the [a] property.
   *
   * ```
   * */
   * ```
   *
   * Thanks for visiting!
   */
  val a = ""
}

Installation

The issue reproduces with both K1 and K2 org.jetbrains.dokka.experimental.tryK2=true analysers.

Additional context

IntelliJ is also unhappy https://youtrack.jetbrains.com/issue/KT-71380

image
vmishenev commented 2 days ago

This is a duplication of https://github.com/Kotlin/dokka/issues/2712