Fixes extra } when rendering hashtags from Markdown
This commit is contained in:
@@ -564,7 +564,12 @@ fun HashTag(
|
||||
|
||||
Text(
|
||||
text = annotatedTermsString,
|
||||
modifier = remember { Modifier.clickable { nav("Hashtag/${segment.hashtag}") } },
|
||||
modifier =
|
||||
remember {
|
||||
Modifier.clickable {
|
||||
nav("Hashtag/${segment.hashtag}")
|
||||
}
|
||||
},
|
||||
inlineContent =
|
||||
if (hashtagIcon != null) {
|
||||
mapOf("inlineContent" to InlineIcon(hashtagIcon))
|
||||
|
||||
+3
-4
@@ -66,8 +66,8 @@ class MarkdownMediaRenderer(
|
||||
override fun shouldRenderLinkPreview(
|
||||
title: String?,
|
||||
uri: String,
|
||||
): Boolean {
|
||||
return if (canPreview && uri.startsWith("http")) {
|
||||
): Boolean =
|
||||
if (canPreview && uri.startsWith("http")) {
|
||||
if (title.isNullOrBlank() || title == uri) {
|
||||
true
|
||||
} else {
|
||||
@@ -76,7 +76,6 @@ class MarkdownMediaRenderer(
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
override fun renderImage(
|
||||
title: String?,
|
||||
@@ -183,7 +182,7 @@ class MarkdownMediaRenderer(
|
||||
richTextStringBuilder: RichTextString.Builder,
|
||||
) {
|
||||
val tagWithoutHash = tag.removePrefix("#")
|
||||
renderAsCompleteLink(tag, "nostr:Hashtag?id=$tagWithoutHash}", richTextStringBuilder)
|
||||
renderAsCompleteLink(tag, "nostr:Hashtag?id=$tagWithoutHash", richTextStringBuilder)
|
||||
|
||||
val hashtagIcon: HashtagIcon? = checkForHashtagWithIcon(tagWithoutHash)
|
||||
if (hashtagIcon != null) {
|
||||
|
||||
Reference in New Issue
Block a user