aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/Kotlin
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2017-02-27 16:51:03 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2017-02-27 16:51:03 +0300
commit706d37bea00702795cb44f9378b2da743163e600 (patch)
tree46370088bc1af8c4697aced4e830269749321e3b /core/src/main/kotlin/Kotlin
parentfa70d728be8420e306cce44e8be2b4074985ac69 (diff)
downloaddokka-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.kt9
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)
}