aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/utils
diff options
context:
space:
mode:
authorMarcin Aman <marcin.aman@gmail.com>2020-10-30 19:01:09 +0100
committerGitHub <noreply@github.com>2020-10-30 19:01:09 +0100
commit1aba0ec4973d7915caa93f1e9b3146ad82111903 (patch)
treeb9424de4bc22f8453ecb32aaa8f7f020bcd49e9f /plugins/base/src/test/kotlin/utils
parentda498f50eabfad8969eb7795a535e97f7e25ca58 (diff)
downloaddokka-1aba0ec4973d7915caa93f1e9b3146ad82111903.tar.gz
dokka-1aba0ec4973d7915caa93f1e9b3146ad82111903.tar.bz2
dokka-1aba0ec4973d7915caa93f1e9b3146ad82111903.zip
Fix parsing first word in deprecated (#1595)
Fix parsing first word in `Deprecated` annotations, fix `Throws` and `See` tags
Diffstat (limited to 'plugins/base/src/test/kotlin/utils')
-rw-r--r--plugins/base/src/test/kotlin/utils/contentUtils.kt16
1 files changed, 11 insertions, 5 deletions
diff --git a/plugins/base/src/test/kotlin/utils/contentUtils.kt b/plugins/base/src/test/kotlin/utils/contentUtils.kt
index 38d6450c..5d8673d0 100644
--- a/plugins/base/src/test/kotlin/utils/contentUtils.kt
+++ b/plugins/base/src/test/kotlin/utils/contentUtils.kt
@@ -33,7 +33,9 @@ fun ContentMatcherBuilder<*>.bareSignature(
unwrapAnnotation(it)
}
}
- +("$visibility $modifier ${keywords.joinToString("") { "$it " }} fun")
+ if (visibility.isNotBlank()) +"$visibility "
+ if (modifier.isNotBlank()) +"$modifier "
+ +("${keywords.joinToString("") { "$it " }}fun ")
link { +name }
+"("
params.forEachIndexed { id, (n, t) ->
@@ -45,7 +47,7 @@ fun ContentMatcherBuilder<*>.bareSignature(
+it
}
- +"$n:"
+ +"$n: "
group { link { +(t.type) } }
if (id != params.lastIndex)
+", "
@@ -90,7 +92,9 @@ fun ContentMatcherBuilder<*>.bareSignatureWithReceiver(
unwrapAnnotation(it)
}
}
- +("$visibility $modifier ${keywords.joinToString("") { "$it " }} fun")
+ if (visibility != null && visibility.isNotBlank()) +"$visibility "
+ if (modifier != null && modifier.isNotBlank()) +"$modifier "
+ +("${keywords.joinToString("") { "$it " }}fun ")
group {
link { +receiver }
}
@@ -106,7 +110,7 @@ fun ContentMatcherBuilder<*>.bareSignatureWithReceiver(
+it
}
- +"$n:"
+ +"$n: "
group { link { +(t.type) } }
if (id != params.lastIndex)
+", "
@@ -150,7 +154,9 @@ fun ContentMatcherBuilder<*>.propertySignature(
unwrapAnnotation(it)
}
}
- +("$visibility $modifier ${keywords.joinToString("") { "$it " }} $preposition")
+ if (visibility.isNotBlank()) +"$visibility "
+ if (modifier.isNotBlank()) +"$modifier "
+ +("${keywords.joinToString("") { "$it " }}$preposition ")
link { +name }
if (type != null) {
+(": ")