aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/model/WithChildren.kt
diff options
context:
space:
mode:
authorGoooler <wangzongler@gmail.com>2022-02-21 22:01:06 +0800
committerGitHub <noreply@github.com>2022-02-21 17:01:06 +0300
commitf5b7797255576e5f1c230e2ca3fcb5f4e602387c (patch)
tree25fd98250066c4ed6c2fff1104be533604bbf1b9 /core/src/main/kotlin/model/WithChildren.kt
parentdf4780c31026aaa626746f49f0e6fa3fa0278a05 (diff)
downloaddokka-f5b7797255576e5f1c230e2ca3fcb5f4e602387c.tar.gz
dokka-f5b7797255576e5f1c230e2ca3fcb5f4e602387c.tar.bz2
dokka-f5b7797255576e5f1c230e2ca3fcb5f4e602387c.zip
Code cleanups (#2165)
Diffstat (limited to 'core/src/main/kotlin/model/WithChildren.kt')
-rw-r--r--core/src/main/kotlin/model/WithChildren.kt8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/main/kotlin/model/WithChildren.kt b/core/src/main/kotlin/model/WithChildren.kt
index 59a14acc..01a188c8 100644
--- a/core/src/main/kotlin/model/WithChildren.kt
+++ b/core/src/main/kotlin/model/WithChildren.kt
@@ -79,10 +79,10 @@ fun <T : WithChildren<T>> T.asPrintableTree(
nodeNameBuilder(element)
appendLine()
element.children.takeIf(Collection<*>::isNotEmpty)?.also { children ->
- val newOwnPrefix = childPrefix + '\u251c' + '\u2500' + ' '
- val lastOwnPrefix = childPrefix + '\u2514' + '\u2500' + ' '
- val newChildPrefix = childPrefix + '\u2502' + ' ' + ' '
- val lastChildPrefix = childPrefix + ' ' + ' ' + ' '
+ val newOwnPrefix = "$childPrefix├─ "
+ val lastOwnPrefix = "$childPrefix└─ "
+ val newChildPrefix = "$childPrefix│ "
+ val lastChildPrefix = "$childPrefix "
children.forEachIndexed { n, e ->
if (n != children.lastIndex) append(e, newOwnPrefix, newChildPrefix)
else append(e, lastOwnPrefix, lastChildPrefix)