diff --git a/dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/DirectiveBasedTemplateProcessing.kt b/dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/DirectiveBasedTemplateProcessing.kt index d8ee2e780f..0e8e904d60 100644 --- a/dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/DirectiveBasedTemplateProcessing.kt +++ b/dokka-subprojects/plugin-templating/src/main/kotlin/org/jetbrains/dokka/templates/DirectiveBasedTemplateProcessing.kt @@ -41,7 +41,8 @@ public class DirectiveBasedHtmlTemplateProcessingStrategy(private val context: D handleCommandAsComment(command, bodyTrimed, input, output) } - Files.write(output.toPath(), listOf(document.outerHtml())) + // drop last additional \n character that's added + Files.write(output.toPath(), listOf(document.outerHtml().dropLast(1))) true } else false