From f5b7797255576e5f1c230e2ca3fcb5f4e602387c Mon Sep 17 00:00:00 2001 From: Goooler Date: Mon, 21 Feb 2022 22:01:06 +0800 Subject: Code cleanups (#2165) --- core/src/main/kotlin/model/WithChildren.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/src/main/kotlin/model/WithChildren.kt') 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.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) -- cgit