Skip to content

Class Constructors #1930

@msink

Description

@msink

Describe the bug
Documentation for Class Constructors is broken.

Comparing to Dokka 0.9 there are multiple regressions:

  1. everywhere constructors rendered as factory function fun Clazz instead of just Clazz
  2. class name on top of index page rendered with default constructor, should be just class Clazz
  3. no description on -clazz, should duplicate description of class
    • but not place it in index table like Clazz()<br>Simple test clazz., this piece in Dokka 0.9 was wrong
  4. empty header of table on index, was | Name | Summary |
  5. link to constructors page in table should be only in first row and column

At least first two regressions here shoud be classified as critical - generated result is just plain wrong.
In all supported formats.

To Reproduce
Simple test:

/** Simple test clazz. */
class Clazz(name: String) {
    constructor() : this("Hello")
}

generates GFM output with two files:
(HTML output is similar, just harder to check)

index.md

# Clazz

class Clazz(name: String)

Simple test clazz.

### Constructors

| | |
|---|---|
| [Clazz](-clazz.md) | fun Clazz() |
| [Clazz](-clazz.md) | fun Clazz(name: String) |

-clazz.md:

# Clazz

fun Clazz()

fun Clazz(name: String)

Expected behaviour

index.md

# Clazz

`class Clazz`

Simple test clazz.

### Constructors

| Name | Summary |
|---|---|
| [Clazz](-clazz.md) | `Clazz()` |
| | `Clazz(name: String)` |

-clazz.md:

# Clazz

`Clazz()`\
`Clazz(name: String)`

Simple test clazz.
  • Operating system: macOS/Windows/Linux
  • Build tool: Gradle v6.8.0
  • Dokka version: 1.4.32

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugformat: gfmAn issue/PR related to Dokka's GFM output format

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions