From 986766ba6b3d5ca1167371046fa312ab79feb78d Mon Sep 17 00:00:00 2001
From: Lanius Trolling
"
} else
- " ", "").replace(" ", " ").replace("
"
+ "
"
appendTextRaw(newline)
}
@@ -103,7 +103,7 @@ sealed class TextParserState
")
+ appendTextRaw("
")
NoFormatText(scope, "", insideTags, internalState)
} else
NoFormatText(scope, newText, insideTags, internalState)
diff --git a/src/jvmMain/kotlin/info/mechyrdia/lore/parser_tags.kt b/src/jvmMain/kotlin/info/mechyrdia/lore/parser_tags.kt
index e37dc19..35177c5 100644
--- a/src/jvmMain/kotlin/info/mechyrdia/lore/parser_tags.kt
+++ b/src/jvmMain/kotlin/info/mechyrdia/lore/parser_tags.kt
@@ -542,4 +542,4 @@ fun headerContentToAnchor(content: String) = headerContentToLabel(content).repla
fun imagePathToOpenGraphValue(path: String) = "https://mechyrdia.info/assets/images/${sanitizeLink(path)}"
fun descriptionContentToPlainText(content: String) = TextParserState.uncensorText(content.replace(INSIDE_TAG_TEXT, ""))
-fun commentToPlainText(contentRaw: String) = TextParserState.uncensorText(TextParserState.parseText(contentRaw, TextParserCommentTagsPlainText.asTags, Unit).replace("
", ""))
+fun commentToPlainText(contentRaw: String) = TextParserState.uncensorText(TextParserState.parseText(contentRaw, TextParserCommentTagsPlainText.asTags, Unit).replace("
", " ").replace(Regex("\\s+"), " "))
--
2.25.1