aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/translators/documentables
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2020-03-04 16:50:40 +0100
committerKamil Doległo <kamilok1965@users.noreply.github.com>2020-03-04 18:00:19 +0100
commitea0945efe8c7b5dd9aabc4f049afaac612b70422 (patch)
treec9ec76eb58675858d774b0392b901057c0fa1a94 /plugins/base/src/main/kotlin/translators/documentables
parent44cb921d69ca8bb6b2341df0532823d4e285be03 (diff)
downloaddokka-ea0945efe8c7b5dd9aabc4f049afaac612b70422.tar.gz
dokka-ea0945efe8c7b5dd9aabc4f049afaac612b70422.tar.bz2
dokka-ea0945efe8c7b5dd9aabc4f049afaac612b70422.zip
Fix some DRI translations
Diffstat (limited to 'plugins/base/src/main/kotlin/translators/documentables')
-rw-r--r--plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt b/plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt
index ef1b8ec1..b9e20919 100644
--- a/plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt
+++ b/plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt
@@ -4,6 +4,7 @@ import org.jetbrains.dokka.base.signatures.SignatureProvider
import org.jetbrains.dokka.base.transformers.pages.comments.CommentsToContentConverter
import org.jetbrains.dokka.links.DRI
import org.jetbrains.dokka.model.Documentable
+import org.jetbrains.dokka.model.PlatformDependent
import org.jetbrains.dokka.model.TypeWrapper
import org.jetbrains.dokka.model.doc.DocTag
import org.jetbrains.dokka.model.properties.PropertyContainer
@@ -264,5 +265,13 @@ open class PageContentBuilder(
type(it)
}
}
+
+
+ fun <T> platformText(
+ value: PlatformDependent<T>,
+ transform: (T) -> String
+ ) = value.entries.forEach { (p, v) ->
+ transform(v).takeIf { it.isNotBlank() }?.also { text(it, platformData = setOf(p)) }
+ }
}
} \ No newline at end of file