diff --git a/common/src/main/java/com/habitrpg/common/habitica/helpers/MarkdownParser.kt b/common/src/main/java/com/habitrpg/common/habitica/helpers/MarkdownParser.kt index fe4acac40..4d8b97158 100644 --- a/common/src/main/java/com/habitrpg/common/habitica/helpers/MarkdownParser.kt +++ b/common/src/main/java/com/habitrpg/common/habitica/helpers/MarkdownParser.kt @@ -204,12 +204,12 @@ object MarkdownParser { return EmojiParser.convertToCheatCode(input.toString()) } - private val markdownRegex = ".*[*#_\\[`~].*".toRegex() + private val markdownRegex = "[*#_\\[`~]".toRegex() private val imageMarkdownRegex = """!\[.*?]\(.*?".*?"\)""".toRegex() private val markdownLinkRegex = "\\[([^\\]]+)\\]\\(([^\\)]+)\\)".toRegex() fun containsMarkdown(text: String): Boolean { - return text.matches(markdownRegex) || + return text.contains(markdownRegex) || text.contains(imageMarkdownRegex) || text.contains(markdownLinkRegex) }