IceCubesApp icon indicating copy to clipboard operation
IceCubesApp copied to clipboard

Bug: Markdown links in user's profile are not tapable

Open nixzhu opened this issue 2 years ago • 1 comments

For example,

I'm [nixzhu](https://mastodon.social/@nixzhu).

will be rendered from

I'm [nixzhu]([https://mastodon.social/@nixzhu](https://mastodon.social/@nixzhu)).

I think the problem is that the asMarkdown in HTMLString is from HTMLParser().parse(html: htmlValue)

    do {
      asMarkdown = try HTMLParser().parse(html: htmlValue)
        .toMarkdown()
        .replacingOccurrences(of: ")[", with: ") [")
    } catch {
      asMarkdown = htmlValue
    }

nixzhu avatar Jan 27 '23 02:01 nixzhu

I don't know what the desired fix should look like because even the official Mastodon website doesn't render markdown links in the bio. But yes, they can be opened, that's a bug in IceCubes for sure. So you just want to display I'm [nixzhu](mastodon.social/@nixzhu). where the URL is tappable but the text is rendered as it is, right? In the same way, as it does the Mastodon website?

There is no straightforward way how to render markdown links because the HTML2Markdown transforms HTML into markdown and can't process markdown + HTML and create only markdown output from it.

tomassliz avatar Jan 30 '23 00:01 tomassliz