Single post

jump to replies

I think something very annoying about #mastodon is there isn’t a universal rich text format. I have better control of the look of text in #iMessage

I guess it isn’t an easy thing to fix. Even declaring a bunch of html tags are ok would run into other limitations like post sizes being limit to 500 characters. It’s an endless onion of things that would need to get tweaked so I can make something <b>bold</b>?

3 replies

back to top
Third spruce tree on the left , @tezoatlipoca@mas.to
(open profile)

@bryan

Not just mastodon, but Fediverse wide: inconsistent markdown (or html) support amongst the various platforms... or even amongst the same platform, the _clients_. <- while mastodon supports markdown, some masto clients will render that as italicized, others wont. My client, #phanpy WON'T, but it has no problem with "code" `like this` oddly.

The body or `content` field of a Note object in the ActivityStreams parlance is presented as-is, up to the recipient to render how they like. SO try a different client

Im writing an ActivityPub server myself, and I make the assumption that `content` of a Note object may contain markdown - so anytime I render it, any markdown gets .. marked up accordingly. But that may break on a user who enters `# foo` into that field, because i'm going to render that as an `.h1` in my html interface.. when all they wanted was a pound/hash symbol. So then, do I then look for an "escape" character like `\# foo`?. It gets complicated.

I’m writing my own #mastodon iOS client (also trying to support #gotosocial and #snac2).

It’s a mess. Trying to autodetect formatting is not easy and I’m basically just supporting subsets of a bunch of tags (or markdown) and then rendering it into a html… into attributedstring types in swift. It’s all annoying.

@tezoatlipoca

Third spruce tree on the left , @tezoatlipoca@mas.to
(open profile)

@bryan

Yeah I hear ya. I just made the blanket assumption that `content` may contain markdown and if it does try and render it; things get a little weird if that field already contains HTML sometimes but mostly it just works.

And I just grabbed an existing C# markdown -> html parsing lib for when my pages are rendered. And for client side editing I just grabbed `EasyMDE` github.com/Ionaru/easy-markdow and stopped worrying about markdown support at all. If it renders great, if not <shrug>. What's more important, the content or presentation? (my $0.02: in something as complex and diverse and open sourcey (aka multiple owners, multiple directions) as the fediverse, I'd argue the content) Am surprised there aren't existing Swift libs for markdown parsing, editing, rendering.