diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-02-27 16:51:03 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-02-27 16:51:03 +0300 |
commit | 706d37bea00702795cb44f9378b2da743163e600 (patch) | |
tree | 46370088bc1af8c4697aced4e830269749321e3b /core/src/main/kotlin/Kotlin | |
parent | fa70d728be8420e306cce44e8be2b4074985ac69 (diff) | |
download | dokka-706d37bea00702795cb44f9378b2da743163e600.tar.gz dokka-706d37bea00702795cb44f9378b2da743163e600.tar.bz2 dokka-706d37bea00702795cb44f9378b2da743163e600.zip |
data-platform attribute for index rows in kotlin-website format
Diffstat (limited to 'core/src/main/kotlin/Kotlin')
-rw-r--r-- | core/src/main/kotlin/Kotlin/DocumentationBuilder.kt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt index 2ab43fa1..fcb86d53 100644 --- a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt +++ b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt @@ -234,10 +234,11 @@ class DocumentationBuilder } fun DocumentationNode.appendSinceKotlin(annotation: DocumentationNode) { - var kotlinVersion = annotation.detail(NodeKind.Parameter).detail(NodeKind.Value).name - if (kotlinVersion.startsWith('\"') && kotlinVersion.endsWith('\"')) { - kotlinVersion = kotlinVersion.substring(1..kotlinVersion.length-2) - } + val kotlinVersion = annotation + .detail(NodeKind.Parameter) + .detail(NodeKind.Value) + .name.removeSurrounding("\"") + append(platformNodeRegistry["Kotlin " + kotlinVersion], RefKind.Platform) } |