From d47d386ad8c0ff4a2c3b9d5b4450a773bdcba2dc Mon Sep 17 00:00:00 2001 From: Andrzej Ratajczak Date: Mon, 4 May 2020 13:53:10 +0200 Subject: Enhance signature presentation. Support presetnation Java as Kotlin and Kotlin as Java. Refactor annotations creation from PSI/Descriptors. Add proper rendering of annotation signatures in both kotlin syntax and java syntax. Tests for annotations --- .../pages/annotations/DeprecatedStrikethroughTransformer.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/base/src/main/kotlin/transformers/pages') diff --git a/plugins/base/src/main/kotlin/transformers/pages/annotations/DeprecatedStrikethroughTransformer.kt b/plugins/base/src/main/kotlin/transformers/pages/annotations/DeprecatedStrikethroughTransformer.kt index 55f01ad3..96e2c907 100644 --- a/plugins/base/src/main/kotlin/transformers/pages/annotations/DeprecatedStrikethroughTransformer.kt +++ b/plugins/base/src/main/kotlin/transformers/pages/annotations/DeprecatedStrikethroughTransformer.kt @@ -11,11 +11,11 @@ class DeprecatedStrikethroughTransformer(val context: DokkaContext) : PageTransf override fun invoke(input: RootPageNode): RootPageNode = input.transformContentPagesTree { contentPage -> if (contentPage.documentable?.isDeprecated() == true || contentPage.documentable?.hasDeprecatedChildren() == true) { val deprecatedDRIs = - contentPage.dri + - contentPage.documentable?.children - ?.filter { it.isDeprecated() } - ?.map { it.dri } - ?.toSet().orEmpty() + if (contentPage.documentable?.isDeprecated() == true) contentPage.dri else emptySet() + + contentPage.documentable?.children + ?.filter { it.isDeprecated() } + ?.map { it.dri } + ?.toSet().orEmpty() contentPage.modified(content = contentPage.content.addStrikethroughToSignature(deprecatedDRIs)) } else { -- cgit