diff options
Diffstat (limited to 'core/src/main')
-rw-r--r-- | core/src/main/kotlin/Formats/HtmlFormatService.kt | 6 | ||||
-rw-r--r-- | core/src/main/kotlin/Formats/StructuredFormatService.kt | 11 | ||||
-rw-r--r-- | core/src/main/kotlin/Kotlin/DocumentationBuilder.kt | 2 |
3 files changed, 12 insertions, 7 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(" ") } - 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 70cf4311..44b06e8b 100644 --- a/core/src/main/kotlin/Formats/StructuredFormatService.kt +++ b/core/src/main/kotlin/Formats/StructuredFormatService.kt @@ -775,7 +775,9 @@ abstract class StructuredOutputBuilder(val to: StringBuilder, appendPlatforms(platforms) } // appendHeader(level = 4) { + appendParagraph { appendLink(memberLocation) + } // if (members.singleOrNull()?.kind != NodeKind.ExternalClass) { // appendPlatforms(platforms) // } @@ -829,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) } diff --git a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt index d6413b64..eb0399c7 100644 --- a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt +++ b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt @@ -296,7 +296,6 @@ class DocumentationBuilder fun DocumentationNode.appendModifiers(descriptor: DeclarationDescriptor) { val psi = (descriptor as DeclarationDescriptorWithSource).source.getPsi() as? KtModifierListOwner ?: return - appendInline(descriptor, psi) KtTokens.MODIFIER_KEYWORDS_ARRAY.filter { it !in knownModifiers }.sortedBy { @@ -306,6 +305,7 @@ class DocumentationBuilder appendTextNode(it.value, NodeKind.Modifier) } } + appendInline(descriptor, psi) } fun DocumentationNode.appendDefaultPlatforms(descriptor: DeclarationDescriptor) { |