🤔 Would be nice of Mastodon clients could render text differently depending on code/script/markup 'language'. So if I share a Python snippet it would detect that and change colors accordingly.

🔎 Like Notepad++ has, different colors depending on syntaxis. With styles defined in XML.

#️⃣ #mastodon #fediverse #coding
@me It would be a great start if Mastodon started supporting Markdown in the first place, like most of the rest of the Fediverse services. Then code blocks would be ”built-in”.
Follow

@m @me

Some instances do support BTW. Qoto does.

(I'm sure you meant the default build, but I just wanted to point this out in case people weren't aware.)

@volkris @m
Could this best be accomplished server side or cliënt side?
Really dont know 😏

@me @m

I suppose it depends on what you mean by server and client, I only use the web interface, so my client is the server? :)

Fediverse is built on ActivityPub protocol, which allows people to send content around as they wish without limits on exactly what sort of content it is.

So it's really up to different programs like Mastodon, Pleroma, and whatever else to work out what to send around and how to render it to the screen.

Third party clients do add yet another layer to that, though.

@volkris:
ah I'm a app / fat client type of guy so didnt think of that.

Dont know if a browser client could have that without server side code.
And browser plugins have other disadvantages.

But was primarly thinking about Android/iOS clients and (Electron) Windows apps. Would require them to have the 'intelligence' to detect language I guess.

@me

I believe the message is somehow tagged as to whether it's markdown or not.

After all, when the website displays markdown vs text, it somehow knows which way to go.

Apps should have the same opportunity.

And this doesn't require any sort of browser plugin. It's just a webpage.

@me

IMHO the server should retain the posts as they are, i.e. in ”raw” Markdown, and let the client interpret/render it if it can and otherwise show the original post. Given that Markdown is so minimalistic, with a plaintext formatting syntax, most people who are used to it are also use to read Markdown in flowing text, and understands what asterisks and underscores (etc) represent if they happen to be on a client that can’t render it.

Otherwise rendering Markdown to HTML is so common and light-weight these days that there are even javascript libraries that does it on the fly, so shouldn’t be difficult, or come with a great overhead, to include even in apps.

If I got to decide all plain-text input form boxes should have Markdown capability. It isn’t like it takes a lot more storage space either.

@volkris
@volkris

Yeah, Qoto has a very special fork/build though, with lots of enhancements that most of the Mastodon users would be surprised to learn about. But yeah, given the question and the platform mentioned I meant the default build that the majority of Mastodon people are on. For all of us that use not-Mastodon it is a shame we can’t use all the capabilities our platforms have if we wish to be compatible with Mastodon users.

@me

@m @me

So it's good to raise awareness about what the default build is missing out on to try to prompt those developers into adopting the features that is introducing 🙂

(To be clear, I am 100% making this post in the effort to do exactly what I'm saying here :-) )

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.