From: Lanius Trolling Date: Thu, 7 Mar 2024 17:41:00 +0000 (-0500) Subject: Fix page descriptions having formatting tags X-Git-Url: https://gitweb.starshipfights.net/?a=commitdiff_plain;h=d2f3e8aedc686a1d6352fd17f2c531fc4009624e;p=factbooks Fix page descriptions having formatting tags --- diff --git a/src/jvmMain/kotlin/info/mechyrdia/lore/parser_tags.kt b/src/jvmMain/kotlin/info/mechyrdia/lore/parser_tags.kt index 4f15987..280c013 100644 --- a/src/jvmMain/kotlin/info/mechyrdia/lore/parser_tags.kt +++ b/src/jvmMain/kotlin/info/mechyrdia/lore/parser_tags.kt @@ -549,6 +549,6 @@ fun headerContentToLabel(content: String) = TextParserState.uncensorText(content fun headerContentToAnchor(content: String) = headerContentToLabel(content).replace(NON_ANCHOR_CHAR, "-") fun imagePathToOpenGraphValue(path: String) = "https://mechyrdia.info/assets/images/${sanitizeLink(path)}" -fun descriptionContentToPlainText(content: String) = TextParserState.uncensorText(content) +fun descriptionContentToPlainText(content: String) = TextParserState.uncensorText(content.replace(INSIDE_TAG_TEXT, "")) fun commentToPlainText(contentRaw: String) = TextParserState.uncensorText(TextParserState.parseText(contentRaw, TextParserCommentTagsPlainText.asTags, Unit).replace("

", "").replace("

", "").replace("
", ""))