aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/Utilities/nodeDebug.kt
diff options
context:
space:
mode:
authorPaweł Marks <pmarks@virtuslab.com>2019-11-04 13:58:11 +0100
committerPaweł Marks <pmarks@virtuslab.com>2019-11-04 13:58:11 +0100
commit86446ac53fc691a5f894e66e0608b67bbf1c3b60 (patch)
treef80a2bca43b2f532d81a0941fb857dbdedfc8360 /core/src/main/kotlin/Utilities/nodeDebug.kt
parent0a18e1c31f6a8dcec4b3e95f8795a53dd5df9fcc (diff)
downloaddokka-86446ac53fc691a5f894e66e0608b67bbf1c3b60.tar.gz
dokka-86446ac53fc691a5f894e66e0608b67bbf1c3b60.tar.bz2
dokka-86446ac53fc691a5f894e66e0608b67bbf1c3b60.zip
Adds information about tags to documentation graphs
Diffstat (limited to 'core/src/main/kotlin/Utilities/nodeDebug.kt')
-rw-r--r--core/src/main/kotlin/Utilities/nodeDebug.kt19
1 files changed, 8 insertions, 11 deletions
diff --git a/core/src/main/kotlin/Utilities/nodeDebug.kt b/core/src/main/kotlin/Utilities/nodeDebug.kt
index 423e3e5f..c7a771d8 100644
--- a/core/src/main/kotlin/Utilities/nodeDebug.kt
+++ b/core/src/main/kotlin/Utilities/nodeDebug.kt
@@ -10,15 +10,12 @@ const val LAST = '\u2517'
fun <T : DeclarationDescriptor> DocumentationNode<T>.pretty(prefix: String = "", isLast: Boolean = true): String {
val nextPrefix = prefix + (if (isLast) ' ' else DOWN) + ' '
- return prefix + (if (isLast) LAST else BRANCH) + this.toString() + children.dropLast(1).map {
- it.pretty(
- nextPrefix,
- false
- )
- }.plus(
- children.lastOrNull()?.pretty(nextPrefix)
- ).filterNotNull().takeIf { it.isNotEmpty() }?.joinToString(
- prefix = "\n",
- separator = ""
- ).orEmpty() + if (children.isEmpty()) "\n" else ""
+ return prefix + (if (isLast) LAST else BRANCH) + this.toString() +
+ children.dropLast(1)
+ .map { it.pretty(nextPrefix, false) }
+ .plus(children.lastOrNull()?.pretty(nextPrefix))
+ .filterNotNull()
+ .takeIf { it.isNotEmpty() }
+ ?.joinToString(prefix = "\n", separator = "")
+ .orEmpty() + if (children.isEmpty()) "\n" else ""
} \ No newline at end of file