Skip to content

Old versions get additional new line added #3965

Open
@jeffdgr8

Description

Describe the bug
Using the versioning plugin, older version HTML files receive an extra new line whenever they're processed with :dokkaGenerate. When a project replaces the older version HTML files every time they're reprocessed when API docs are regenerated, this will continuously grow the size of these older version files.

Expected behaviour
Older version files shouldn't receive an extra new line character, only necessary changes should be made to the files.

To Reproduce
Run :dokkaGenerate on a project with older version docs and compare the processed files with the original to see the additional new line character in every HTML file.

Dokka configuration
Configuration of dokka used to reproduce the bug

dependencies {
    dokkaPlugin(libs.dokka.versioning)
}

tasks.dokkaGeneratePublicationHtml {
    dokka.pluginsConfiguration.versioning {
        olderVersionsDir = projectDir.resolve("docs/older")
        // ...
    }
}

Installation

  • Operating system: macOS
  • Build tool: Gradle v8.11.1
  • Dokka version: 2.0.0 (also 1.9.20)

Additional context
Reproducible with my library, Kotbase. Just run :dokkaGenerate and observe the Git changes. The only changes will be the additional new line characters to the older version HTML files. Every subsequent run will add an additional new line.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions