aboutsummaryrefslogtreecommitdiff
path: root/plugins/kotlin-as-java
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2020-03-11 22:01:04 +0100
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-03-12 09:03:22 +0100
commit18bada290ab8ebdbf6f5e43d9c3415dd5225227d (patch)
tree65d0d775fdb180740fc3c3660b2d563a0e9a613c /plugins/kotlin-as-java
parentf60a499f6242411e191c60dd5ca1578155594103 (diff)
downloaddokka-18bada290ab8ebdbf6f5e43d9c3415dd5225227d.tar.gz
dokka-18bada290ab8ebdbf6f5e43d9c3415dd5225227d.tar.bz2
dokka-18bada290ab8ebdbf6f5e43d9c3415dd5225227d.zip
Fix nested monospace spans in signature
Diffstat (limited to 'plugins/kotlin-as-java')
-rw-r--r--plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt b/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt
index 265e05cd..284d6ab9 100644
--- a/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt
+++ b/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt
@@ -10,7 +10,7 @@ import org.jetbrains.dokka.model.Enum
import org.jetbrains.dokka.model.Function
import org.jetbrains.dokka.pages.ContentKind
import org.jetbrains.dokka.pages.ContentNode
-import org.jetbrains.dokka.pages.PlatformData
+import org.jetbrains.dokka.pages.TextStyle
import org.jetbrains.dokka.utilities.DokkaLogger
class JavaSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogger) : SignatureProvider {
@@ -30,7 +30,7 @@ class JavaSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogge
)
}
- private fun signature(c: Classlike) = contentBuilder.contentFor(c, ContentKind.Symbol) {
+ private fun signature(c: Classlike) = contentBuilder.contentFor(c, ContentKind.Symbol, setOf(TextStyle.Monospace)) {
platformText(c.visibility) { (it.takeIf { it !in ignoredVisibilities }?.name ?: "") + " " }
if (c is Class) {
@@ -59,7 +59,7 @@ class JavaSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogge
}
}
- private fun signature(f: Function) = contentBuilder.contentFor(f, ContentKind.Symbol) {
+ private fun signature(f: Function) = contentBuilder.contentFor(f, ContentKind.Symbol, setOf(TextStyle.Monospace)) {
text(f.modifier.takeIf { it !in ignoredModifiers }?.name.orEmpty() + " ")
val returnType = f.type
signatureForProjection(returnType)
@@ -77,7 +77,7 @@ class JavaSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogge
text(")")
}
- private fun signature(t: TypeParameter) = contentBuilder.contentFor(t, ContentKind.Symbol) {
+ private fun signature(t: TypeParameter) = contentBuilder.contentFor(t) {
text(t.name.substringAfterLast("."))
list(t.bounds, prefix = " extends ") {
signatureForProjection(it)