aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2019-04-16 11:21:31 +0200
committerKamil Doległo <kamilok1965@interia.pl>2019-04-16 11:21:31 +0200
commit6e865cd1dbc09d17905fc65a1f4b95f78af108f5 (patch)
tree0fd84d281062fc81e2a0b2455486446517a2e927 /core
parent9ed9e09e0cbb87b3e8da9c6112c17a996951ab24 (diff)
downloaddokka-6e865cd1dbc09d17905fc65a1f4b95f78af108f5.tar.gz
dokka-6e865cd1dbc09d17905fc65a1f4b95f78af108f5.tar.bz2
dokka-6e865cd1dbc09d17905fc65a1f4b95f78af108f5.zip
Fix html formatting in some tests
Diffstat (limited to 'core')
-rw-r--r--core/src/main/kotlin/Formats/HtmlFormatService.kt6
-rw-r--r--core/src/main/kotlin/Formats/StructuredFormatService.kt9
2 files changed, 9 insertions, 6 deletions
diff --git a/core/src/main/kotlin/Formats/HtmlFormatService.kt b/core/src/main/kotlin/Formats/HtmlFormatService.kt
index 0ad946be..d36ea0a2 100644
--- a/core/src/main/kotlin/Formats/HtmlFormatService.kt
+++ b/core/src/main/kotlin/Formats/HtmlFormatService.kt
@@ -88,9 +88,7 @@ open class HtmlOutputBuilder(to: StringBuilder,
to.append("&nbsp;")
}
- override fun ensureParagraph() {
-
- }
+ override fun ensureParagraph() {}
}
open class HtmlFormatService @Inject constructor(generator: NodeLocationAwareGenerator,
@@ -144,7 +142,7 @@ fun formatPageTitle(node: DocumentationNode): String {
}
val qName = qualifiedNameForPageTitle(node)
- return qName + " - " + moduleName
+ return "$qName - $moduleName"
}
private fun qualifiedNameForPageTitle(node: DocumentationNode): String {
diff --git a/core/src/main/kotlin/Formats/StructuredFormatService.kt b/core/src/main/kotlin/Formats/StructuredFormatService.kt
index 5aa1131c..44b06e8b 100644
--- a/core/src/main/kotlin/Formats/StructuredFormatService.kt
+++ b/core/src/main/kotlin/Formats/StructuredFormatService.kt
@@ -831,12 +831,17 @@ abstract class StructuredOutputBuilder(val to: StringBuilder,
if (summarized.platformPlacement == Summarized.PlatformPlacement.Summary) {
appendPlatforms(summary.platforms)
}
- for (signature in summary.signatures) {
+ summary.signatures.subList(0, summary.signatures.size - 1).forEach {
appendSignatures(
- signature,
+ it,
summarized.platformPlacement == Summarized.PlatformPlacement.Signature
)
+ appendLine()
}
+ appendSignatures(
+ summary.signatures.last(),
+ summarized.platformPlacement == Summarized.PlatformPlacement.Signature
+ )
appendContent(summary.content)
}