Fix URL handling. Fixes #1674

This commit is contained in:
Phillip Thelen 2022-01-10 13:02:15 +01:00
parent 206cf183a5
commit 8eca74d83e
2 changed files with 15 additions and 2 deletions

View file

@ -297,6 +297,18 @@
android:name=".widget.TodosWidgetService"
android:permission="android.permission.BIND_REMOTEVIEWS" />
<service android:name=".widget.HabitButtonWidgetService"/>
</application>
</application>
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
</intent>
</queries>
</manifest>

View file

@ -83,7 +83,8 @@ object MarkdownParser {
return SpannableString("")
}
val text = EmojiParser.parseEmojis(input) ?: input
return markwon?.toMarkdown(text) ?: SpannableString(text)
// Adding this space here bc for some reason some markdown is not rendered correctly when the whole string is supposed to be formatted
return markwon?.toMarkdown("$text ") ?: SpannableString(text)
}
fun parseMarkdownAsync(input: String?, onSuccess: Consumer<Spanned>) {