else
"</p><p>"
} else
- "<br/>"
+ "<br/><br/>"
appendTextRaw(newline)
}
PlainText(scope, "", insideTags, internalState)
} else if (newText.endsWith('\n')) {
appendText(newText.removeSuffix("\n"))
- appendTextRaw("<br/>")
+ appendTextRaw("<br/><br/>")
NoFormatText(scope, "", insideTags, internalState)
} else
NoFormatText(scope, newText, insideTags, internalState)
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("<p>", "").replace("</p>", "").replace("<br/>", ""))
+fun commentToPlainText(contentRaw: String) = TextParserState.uncensorText(TextParserState.parseText(contentRaw, TextParserCommentTagsPlainText.asTags, Unit).replace("<p>", " ").replace("</p>", " ").replace("<br/>", " ").replace(Regex("\\s+"), " "))