Fix / unwanted auto-mardown when trailing space

This commit is contained in:
Valere 2019-07-02 12:29:36 +02:00
parent 6cf24cc43b
commit 85e850bcde
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ internal class LocalEchoEventFactory @Inject constructor(private val credentials
} }


private fun isFormattedTextPertinent(text: String, htmlText: String?) = private fun isFormattedTextPertinent(text: String, htmlText: String?) =
text != htmlText && htmlText != "<p>$text</p>\n" text != htmlText && htmlText != "<p>${text.trim()}</p>\n"


fun createFormattedTextEvent(roomId: String, text: String, formattedText: String): Event { fun createFormattedTextEvent(roomId: String, text: String, formattedText: String): Event {
val content = MessageTextContent( val content = MessageTextContent(