From b728e106165ffb404a0c9842f070d0a364d40a1f Mon Sep 17 00:00:00 2001 From: Tobias Preuss Date: Sun, 21 Jun 2020 20:06:54 +0200 Subject: [PATCH] Removed unneeded conversion. --- .../android/internal/session/room/send/MarkdownParser.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/send/MarkdownParser.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/send/MarkdownParser.kt index 92de583de7..3833b2f87d 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/send/MarkdownParser.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/send/MarkdownParser.kt @@ -37,7 +37,7 @@ internal class MarkdownParser @Inject constructor( fun parse(text: String): TextContent { // If no special char are detected, just return plain text if (text.contains(mdSpecialChars).not()) { - return TextContent(text.toString()) + return TextContent(text) } val document = parser.parse(text) @@ -56,7 +56,7 @@ internal class MarkdownParser @Inject constructor( val plainText = textContentRenderer.render(document) TextContent(plainText, cleanHtmlText.postTreatment()) } else { - TextContent(text.toString()) + TextContent(text) } }