diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2018-10-15 19:03:39 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2018-10-15 19:03:39 +0300 |
commit | 15b408bb59546a65a9a4f3f47067b4fa174702be (patch) | |
tree | 5d71a406f4d14daa390aba59594c8ac12fd62c32 | |
parent | 712bb8ba9b146c769b84503e332fc449ff942141 (diff) | |
download | dokka-15b408bb59546a65a9a4f3f47067b4fa174702be.tar.gz dokka-15b408bb59546a65a9a4f3f47067b4fa174702be.tar.bz2 dokka-15b408bb59546a65a9a4f3f47067b4fa174702be.zip |
Fix sinceKotlin updating & default setting
-rw-r--r-- | core/src/main/kotlin/Kotlin/DocumentationBuilder.kt | 4 | ||||
-rw-r--r-- | core/src/main/kotlin/Model/DocumentationNode.kt | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt index 3fb22589..205b44bd 100644 --- a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt +++ b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt @@ -290,7 +290,9 @@ class DocumentationBuilder } fun DocumentationNode.appendDefaultSinceKotlin() { - sinceKotlin = passConfiguration.sinceKotlin + if (sinceKotlin == null) { + sinceKotlin = passConfiguration.sinceKotlin + } } fun DocumentationNode.appendModifiers(descriptor: DeclarationDescriptor) { diff --git a/core/src/main/kotlin/Model/DocumentationNode.kt b/core/src/main/kotlin/Model/DocumentationNode.kt index 84f9a453..617816b3 100644 --- a/core/src/main/kotlin/Model/DocumentationNode.kt +++ b/core/src/main/kotlin/Model/DocumentationNode.kt @@ -122,8 +122,10 @@ open class DocumentationNode(val name: String, var sinceKotlin: String? get() = references(RefKind.SinceKotlin).singleOrNull()?.to?.name set(value) { - if(value == null) return dropReferences { it.kind == RefKind.SinceKotlin } - append(DocumentationNode(value, Content.Empty, NodeKind.Value), RefKind.SinceKotlin) + dropReferences { it.kind == RefKind.SinceKotlin } + if (value != null) { + append(DocumentationNode(value, Content.Empty, NodeKind.Value), RefKind.SinceKotlin) + } } val supertypes: List<DocumentationNode> |