exclude 'inline', 'noinline' and 'crossinline' from summary report; fix tests
diff --git a/src/Formats/StructuredFormatService.kt b/src/Formats/StructuredFormatService.kt
index 5a8109d..8473ccd 100644
--- a/src/Formats/StructuredFormatService.kt
+++ b/src/Formats/StructuredFormatService.kt
@@ -259,10 +259,8 @@
private fun appendSummarySignatures(items: List<DocumentationNode>, location: Location, to: StringBuilder) {
val summarySignature = languageService.summarizeSignatures(items)
if (summarySignature != null) {
- val signatureAsCode = ContentCode()
- signatureAsCode.append(summarySignature)
- appendAsSignature(to, signatureAsCode) {
- appendLine(to, signatureAsCode.signatureToText(location))
+ appendAsSignature(to, summarySignature) {
+ appendLine(to, summarySignature.signatureToText(location))
}
return
}
@@ -271,7 +269,6 @@
appendAsSignature(to, it) {
appendLine(to, it.signatureToText(location))
}
- appendLine(to)
}
appendAsSignature(to, renderedSignatures.last()) {
to.append(renderedSignatures.last().signatureToText(location))
diff --git a/src/Kotlin/KotlinLanguageService.kt b/src/Kotlin/KotlinLanguageService.kt
index 038ade9..513e1a5 100644
--- a/src/Kotlin/KotlinLanguageService.kt
+++ b/src/Kotlin/KotlinLanguageService.kt
@@ -6,7 +6,7 @@
* Implements [LanguageService] and provides rendering of symbols in Kotlin language
*/
class KotlinLanguageService : LanguageService {
- private val visibilityModifiers = setOf("public", "protected", "private")
+ private val fullOnlyModifiers = setOf("public", "protected", "private", "inline", "noinline", "crossinline")
override fun render(node: DocumentationNode, renderMode: RenderMode): ContentNode {
return content {
@@ -258,7 +258,7 @@
for (it in modifiers) {
if (node.kind == org.jetbrains.dokka.DocumentationNode.Kind.Interface && it.name == "abstract")
continue
- if (renderMode == RenderMode.SUMMARY && it.name in visibilityModifiers) {
+ if (renderMode == RenderMode.SUMMARY && it.name in fullOnlyModifiers) {
continue
}
renderModifier(it)
diff --git a/test/data/format/annotations.md b/test/data/format/annotations.md
index caf8408..b898d55 100644
--- a/test/data/format/annotations.md
+++ b/test/data/format/annotations.md
@@ -16,11 +16,11 @@
### Properties
-| [x](test/-foo/x) | `inline val x: Int` |
+| [x](test/-foo/x) | `val x: Int` |
### Functions
-| [bar](test/-foo/bar) | `inline fun bar(noinline notInlined: () -> Unit): Unit` |
+| [bar](test/-foo/bar) | `fun bar(notInlined: () -> Unit): Unit` |
diff --git a/test/data/format/starProjection.kt b/test/data/format/starProjection.kt
index 1532c83..48d53e4 100644
--- a/test/data/format/starProjection.kt
+++ b/test/data/format/starProjection.kt
@@ -1,3 +1,3 @@
-public inline fun Iterable<*>.containsFoo(element: Any?): Boolean {
+public fun Iterable<*>.containsFoo(element: Any?): Boolean {
return false
}
diff --git a/test/data/format/starProjection.md b/test/data/format/starProjection.md
index 1011408..d6b5e9e 100644
--- a/test/data/format/starProjection.md
+++ b/test/data/format/starProjection.md
@@ -4,5 +4,5 @@
### Extensions for Iterable
-| [containsFoo](test/-iterable/contains-foo) | `inline fun Iterable<*>.containsFoo(element: Any?): Boolean` |
+| [containsFoo](test/-iterable/contains-foo) | `fun Iterable<*>.containsFoo(element: Any?): Boolean` |
diff --git a/test/data/format/summarizeSignatures.md b/test/data/format/summarizeSignatures.md
index 2dcb31a..b1707f4 100644
--- a/test/data/format/summarizeSignatures.md
+++ b/test/data/format/summarizeSignatures.md
@@ -15,7 +15,8 @@
### Functions
-| [foo](test/kotlin/foo) | `fun <T> *any_array*<T>.foo(predicate: (T) -> Boolean): Boolean`
+| [foo](test/kotlin/foo) | `fun <T> any_array<T>.foo(predicate: (T) -> Boolean): Boolean`
+
Returns true if foo.
|