Split newlines in user profile bios
authorTheSaminator <TheSaminator@users.noreply.github.com>
Sat, 9 Apr 2022 17:41:43 +0000 (13:41 -0400)
committerTheSaminator <TheSaminator@users.noreply.github.com>
Sat, 9 Apr 2022 17:41:43 +0000 (13:41 -0400)
src/jvmMain/kotlin/starshipfights/info/views_user.kt

index 4b395b51d6a3996e7ddf60999acfc727b6cedae8..ff396c7cfa4f2744cc21b8917eafb9ab25cc381d 100644 (file)
@@ -103,7 +103,11 @@ suspend fun ApplicationCall.userPage(): HTML.() -> Unit {
                section {
                        h1 { +user.profileName }
                        
-                       +user.profileBio
+                       user.profileBio.split('\n').forEachIndexed { i, p ->
+                               if (i > 0)
+                                       br
+                               +p
+                       }
                }
                section {
                        h2 { +"Admirals" }