From 1aba0ec4973d7915caa93f1e9b3146ad82111903 Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Fri, 30 Oct 2020 19:01:09 +0100 Subject: Fix parsing first word in deprecated (#1595) Fix parsing first word in `Deprecated` annotations, fix `Throws` and `See` tags --- plugins/base/src/test/kotlin/utils/contentUtils.kt | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'plugins/base/src/test/kotlin/utils') 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) { +(": ") -- cgit