diff options
author | Paweł Marks <pmarks@virtuslab.com> | 2019-11-04 13:58:11 +0100 |
---|---|---|
committer | Paweł Marks <pmarks@virtuslab.com> | 2019-11-04 13:58:11 +0100 |
commit | 86446ac53fc691a5f894e66e0608b67bbf1c3b60 (patch) | |
tree | f80a2bca43b2f532d81a0941fb857dbdedfc8360 /core/src/main/kotlin/Utilities | |
parent | 0a18e1c31f6a8dcec4b3e95f8795a53dd5df9fcc (diff) | |
download | dokka-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')
-rw-r--r-- | core/src/main/kotlin/Utilities/nodeDebug.kt | 19 |
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 |