Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mastodon can't just choose to not show markdown anymore. #18958

Closed
Freeplayg opened this issue Aug 10, 2022 · 65 comments
Closed

Mastodon can't just choose to not show markdown anymore. #18958

Freeplayg opened this issue Aug 10, 2022 · 65 comments
Labels
suggestion Feature suggestion

Comments

@Freeplayg
Copy link

Freeplayg commented Aug 10, 2022

Pitch

At least showing markdown from other instances.

TO CLARIFY: Currently, Mastodon strips away any markdown used from other servers and fediverse platforms. This is an issue.

Example post with markdown: https://i.calckey.cloud/notes/991jrz6bm2
image

That same post when viewed from Mastodon: https://mastodon.coffee/@freeplay@i.calckey.cloud/109553057990730094
image

Motivation

Mastodon is the biggest Fediverse platform. And with 99% of other Fediverse platforms (including Mastodon's derivatives/forks) already supporting basic markdown, so much information gets lost. Bold, italics, etc. have so much meaning and can dramatically change how a sentence is read.

Not even blockquotes are visible on Mastodon, it's all just plain text. How am I supposed to know that it's a quote? You can't.

I love this platform, and don't want these disconnects between them. It doesn't matter if you just don't like it. You can't just choose to not add it anymore.

@Freeplayg Freeplayg added the suggestion Feature suggestion label Aug 10, 2022
@arittner
Copy link

I agree and technically it's possible, because the message content is already HTML. Links, hashtags, and emoticons are rendered as HTML, managed by Mastodon.

@Cassolotl
Copy link

I said this when it came around years ago, but yeah, I absolutely agree. If they don't want to add the ability to use markdown in Mastodon posts, fair enough - but at least show incoming posts correctly, come on!!

@trwnh
Copy link
Member

trwnh commented Aug 12, 2022

Duplicate of #15311 and #15554

@dwbit
Copy link

dwbit commented Aug 13, 2022

Not sure if there is a better issue to add this feedback to, but just finished setting up a PeerTube and noticed that markdown from VIdeo/channel bio is not supported when searching/viewing accounts in Mastodon, which gives it a spammy appearance.

@turtlegarden
Copy link

Not showing incoming posts correctly, is, like, a very big issue. I think Mastodon needs to gather itself and implement formatting rendering at the minimum.

@shleeable
Copy link
Contributor

shleeable commented Aug 14, 2022

I'm going to release the stats from a small survey of instance admins in a few weeks, but 70% of them want rich text... so I think this argument is kind of over.

Regardless of simply adding it for compatibility reasons with other AP software.

@mashirozx
Copy link
Contributor

Try markdown here! https://littlefo.rest

@tsmethurst
Copy link

IIRC proper display of a larger range of html elements on incoming posts is already implemented in Glitch, so presumably this could be pulled/adapted relatively easily from there 🤔

@Hund
Copy link

Hund commented Aug 17, 2022

If we see support for this, it would be a good idea to add an option to disable it as well. It should cause any drama for the people who doesn't like Markdown. Not that I understand why anyone wouldn't like it.

@Reedyn
Copy link

Reedyn commented Aug 17, 2022

If we see support for this, it would be a good idea to add an option to disable it as well. It should cause any drama for the people who doesn't like Markdown. Not that I understand why anyone wouldn't like it.

having an option to disable posting via markdown would be a good idea, but as someone posted previously in this issue mastodon should always display formatting when there is formatting and that shouldn't be possible to disable.

@shleeable
Copy link
Contributor

shleeable commented Aug 18, 2022

Depends if you think Mastodon should follow the https://misskey.io/mfm-cheat-sheet style?

Blur/Spoiler is a must have.
I have no problem with fonts.
Animations are up for debate.

or something similar to slack
image

@xxxserxxx
Copy link

It's worth at least discussing a watered-down version of Markdown, such a Gemtext. Supporting a subset designed to be programmatically trivial to parse and render has advantages for broad adoption: it makes it easier for implementers, and keeps clients fast and light.

@ghost
Copy link

ghost commented Aug 24, 2022

Actually, not adding Markdown is just stupid. The only thing needed to do is to find a good markdown => html renderer. Gemtext, which xxxserxxx suggested, seems fine as we don't need full Markdown. I actually something like Discord's Markdown subset will be enough for posts.

@tastytea
Copy link

See also: https://github.com/mastodon/mastodon/pull/10787 and the pull request linked within.

Looks like the main hindrance for this feature is rude people polluting the pull requests. Anyone opening a pull request for Markdown/Rich text support can expect a shitshow. Would you wanna put up with that?

@Freeplayg
Copy link
Author

I've realized that one of the great things about Fediverse is that you can also follow blogs, which are even more likely to have blockquotes, bolding, etc. And you usually can't see that when viewing from Mastodon...

@robsonsobral
Copy link

robsonsobral commented Nov 26, 2022

Gemtext, MissKey and every syntax else aside, I think the best to do is:

  • allow a subset of Markdown only;
  • respect CommonMark Specification.

Anything other than that could charge a huge price in the future.

Lists and paragraphs on Markdown are so intuitive that my clients/users think it's a "default thing". Others features are easy to learn and... Being clear, I've no idea how Brazilians non-tech learned that ~~ means <del>, but I've seen it from time to time!


Update after reading a @Gargron's reply:

I know that half of poll respondents did not want the full extent of rich text on their microblogging platform, and I know which half I personally belong to. I was #10787 to the extent I was comfortable with, but some people do not understand boundaries.

It's usually better to have something than nothing. Starting with a subset can prove if it is worth to go to forward or not. My suggestion of a subset:

  • paragraph
  • lists
  • strong
  • emphasis
  • delete
  • blockquote
  • code block

@eishiya
Copy link

eishiya commented Nov 26, 2022

Thirding(?) the suggestion to let users set whether their posts should be parsed as MD or not. A lot text emotes like *_* and ~*e-glitter*~ and things like *doing actions with asterisks* also use the same symbols as MD and escaping them is annoying and easy to forget. I use Discord and that has forced Markdown, and I'm tired of some of my posts consisting of 20% backslashes, and frequently requiring editing xP I'm also tired of seeing posts using *actions* made by people who don't know/care that they can escape their asterisks and avoid their *actions* blending with surrounding text.

If Mastodon manages posts in HTML though, I worry about MD play along with Editing posts. Would the HTML be converted back to MD for editing? Or did I misunderstand that part?

@robsonsobral
Copy link

robsonsobral commented Nov 26, 2022

As a first move, I would, parse MD on front-end. Then, we could change things further.

I admit I don't care about old posts being escaped, but I think it could enabled on new ones only to save you from the evil backslashes.

@robsonsobral
Copy link

robsonsobral commented Nov 26, 2022

If Mastodon manages posts in HTML though, I worry about MD play along with Editing posts. Would the HTML be converted back to MD for editing? Or did I misunderstand that part?

I don't think user submitted data should be converted on saving, besides trim strings. The parsing should happen after data retrieval from database. Do you ever wanted to fight Microsoft Word for guessing what you're trying to do? Always better to respect the data. Trim, sanitize and save it. Nothing more.


I have seen a lot of people talking against text formatting on microblogging in here, and I understand their fear. What is a stream of thoughts can be transformed into something unreadable. Centuries ago, there was a social network called Orkut and god forbid humankind for what the colors, splashes and whistles have made to each others eyes.

However, design, calligraphy and formatting carry meaning. To say "something" isn't the same as "something":

I've watched mother!

And:

I've watched mother!

(Great movie by the way!)

To write foreign words, sarcasm and titles in italics or bold; to signalize something is a quote, etc would improve the communication.

So, please, let's have it, but in small doses.

@turtlegarden
Copy link

turtlegarden commented Nov 27, 2022

yes, as others have said, imo it would be good to parse basic markdown, e.g. links, bold, italic, code, codeblocks, ul/ol lists, headings, quotes, along with others like <small>, <sup>, <sub>. (less needed the further through the list)

@robsonsobral
Copy link

I don't even think we should have headings and small print for short texts. Links, superscript and subscript could be future improvements. Could. It all depends.

Let's start simple, please.

@jasonbyrne
Copy link

+++ Can we please have some basic formatting with Markdown? Especially code blocks IMO

@McPringle
Copy link

It could be a good idea to provide options.

In my opinion multiple options would add unnecessary complexity, both in implementation / support by clients and in usability. It should be kept simple and easy. We can like it or not, Markdown is very wide spread and known by so many people, that it should be considered "standard".

If someone has used tools like Wikipedia, GitHub, Notion, Twitter (!), etc. before and comes to Mastodon, he would naturally try MD syntax to format messages. I see this every day in my timeline, when there are posts scrolling by using * and ** etc.

@dertuxmalwieder
Copy link

dertuxmalwieder commented Jan 12, 2023

If someone has used tools like Wikipedia, GitHub, Notion, Twitter (!), etc. before and comes to Mastodon, he would naturally try MD syntax to format messages.

If someone has used GNU Emacs for too long, org-mode is a natural choice as well. ;-) "Trying MD" is not as easy as it sounds, as there is a wide variety of "almost compatible" Markdown standards which support different features. Which Markdown dialect would you want to use and why?

(It might even be a good idea to add a formatting toolbar to prevent ambiguities; but then again, org-mode would work just as well.)

@tastytea
Copy link

tastytea commented Jan 12, 2023

If someone has used tools like Wikipedia, GitHub, Notion, Twitter (!), etc. before and comes to Mastodon, he would naturally try MD syntax to format messages.

Perhaps more relevant, all the other Fediverse software that supports rich text, including Mastodon forks, use Markdown (some also allow HTML and/or bbcode).

"Trying MD" is not as easy as it sounds, as there is a wide variety of "almost compatible" Markdown standards which support different features. Which Markdown dialect would you want to use and why?

To my knowledge, there is no Markdown dialect that does the basics like *emphasized*, **strong**, `code`, * lists and > quotes differently. Some support ~~strikethrough~~, some do not. There are slight differences in how newlines are treated and how to force a newline. Most differences are with the more advanced features, that are probably not relevant to Mastodon.

Markdown has a de-facto spec now that most people use.

@arittner
Copy link

I understand these religious-seeming discussions about the best markup language for formatting and surely there is the best in the world for every purpose.

But honestly, we're talking about Mastodon with 500 character message limit.

What do we need? Bold, italic, underlined, and maybe strikethrough. In addition, ordered and unordered lists. And with lists, I'm not sure if they need multiple levels. Oh yes headlines are maybe useful (but not more than 2 levels?!). And with headlines and orded lists we go into the complicated area. (headlines and hashtags, in Plume it's solved with a space between the hash and the headline Text; markdown ordered lists are numbers and maybe a user don't like formatting in this case).

I don't think with this set of formatting we need to discuss whether another markup language is better than Markdown, nor whether there are too many parsing problems with Markdown.

Rather, it would make sense to enforce the feature at all with a simple suggestion. Do not already discuss a golden castle in the air, which is then never implemented under many other important features, because of too much complexity.

Look, even quoted boosts are now considered by @Gargron not impossible. So let's not make it completely impossible with unnecessarily complex requirements.

@mcepl
Copy link

mcepl commented Jan 12, 2023

A self-fulfilling prophecy - people use Markdown because that’s what software vendors provide. It could be a good idea to provide options.

You may not like it, but that’s how the world works. You may like bazaar, Mercurial, svn or something more weird (fossil SCM, darcs, monotone?), but the universe spoke and the answer is git, whether you like it or not. The same goes for many other parts of the software universe, it has tendency to settle on monopoly unless some serious reason applies.

@dertuxmalwieder
Copy link

dertuxmalwieder commented Jan 12, 2023

The universe has no power to decide which technical solutions I prefer to use. (Indeed, I use(d) several of those you named.) Neither does the fact that GitHub uses a version of Markdown necessarily make Mastodon have to use Markdown as well. Different platforms require different solutions. BBCode was already mentioned, and, as Mastodon is more like a web forum than like a collection of READMEs, it would be a logical choice as well.

I never suggested to use Org instead of Markdown. There is no harm in having both though. Mastodon is a technical project, and “popularity” is not always the most important decision aspect in those.

@jubalfh
Copy link

jubalfh commented Jan 13, 2023

@dertuxmalwieder are you volunteering to maintain the org mode support in mastodon for the next five years? because there is more than one reasonably well-maintained markdown processor for ruby, and there are existing mastodon forks that support markdown messages.

@dertuxmalwieder
Copy link

Forks of this repository are not relevant within the scope of this issue tracker. How many processors do you need?

@McPringle
Copy link

McPringle commented Jan 13, 2023

Forks of this repository are not relevant within the scope of this issue tracker.

Generally yes, but in the case of this issue I have a different opinion. We are talking about formatted messages and should always keep in mind that Mastodon is only one client in the Fediverse. There are many more clients out there. And all clients that I know that support formatting of messages (e.g. PeerTube), they all support Markdown. Some support a subset of HTML, too. None supports bbcode, org-mode, etc.

Some people may not like it, but since a few years Markdown is a de-facto-standard for formatting text messages. Therefore, in my opinion we should use the most widely supported option. If we go with bbcode or org-mode or something else, I'm pretty sure this will not be supported by (most) of the other clients which will make reading messages for their users unnecessary ugly. And if a Mastodon user receives a MD formatted message, it won't be nice either. Exchanging formatted messages will be a mess. Users will complain and it will be very hard for them to understand the reason.

Please, everyone in this thread (including myself), think about the users and usability. Mastodon isn't a technical experiment anymore. We should not tackle this issue from a technical perspective or personal preferences.

Maybe having a vote on Mastodon could be a solution to pick the formatting option?

@arittner
Copy link

Generally yes, but in the case of this issue I have a different opinion. We are talking about formatted messages and should always keep in mind that Mastodon is only one client in the Fediverse.

Maybe here is something unclear.

A Markdown syntax is only needed to parse the format wishes. The instance is able to change the format to HTML and all services in Fediverse are able to show it or filter it out. Also Mastodon filters HTML and shows most of a message in plain text.

So mastodon should parse the formatting options and should not filter anymore all HTML elements.

@dertuxmalwieder
Copy link

Some people may not like it, but since a few years Markdown is a de-facto-standard for formatting text messages.

It is one (number of) de-facto standards for formatting a subset of text messages.

Maybe having a vote on Mastodon could be a solution to pick the formatting option?

I think the misunderstanding here is that you consider “options” and “the only option” equal. It was not my intention to only have one supported formatting option.

@ghost
Copy link

ghost commented Jan 20, 2023

The universe has no power to decide which technical solutions I prefer to use. (Indeed, I use(d) several of those you named.) Neither does the fact that GitHub uses a version of Markdown necessarily make Mastodon have to use Markdown as well. Different platforms require different solutions. BBCode was already mentioned, and, as Mastodon is more like a web forum than like a collection of READMEs, it would be a logical choice as well.

I never suggested to use Org instead of Markdown. There is no harm in having both though. Mastodon is a technical project, and “popularity” is not always the most important decision aspect in those.

BBCode is long, Markdown is shorter. Mastodon is for microblogging. Also, there is already a fork of Mastodon which already implements everything

@dertuxmalwieder
Copy link

Markdown is shorter. Mastodon is for microblogging.

Which is why Org would fit.

Also, there is already a fork of Mastodon which already implements everything

I thought it only implements Markdown?

@McPringle
Copy link

I think the misunderstanding here is that you consider “options” and “the only option” equal. It was not my intention to only have one supported formatting option.

Nope, I do not misunderstood it. In my opinion it does not make sense to implement multiple solutions for the same problem if the power of developers is limited. I would not stop you from contributing Org support. I would highly appreciate it. But in case the core team of Mastodon developers has to implement it, they should use the most easy solution known to a huge group of people with wide-spread support by other Fediverse clients.

We can't just demand everything that would be possible. Well, we can, but that doesn't make sense. For each demand, we should consider what makes sense in the respective context and also take into account the severely limited resources in terms of developer capacity in order to increase the likelihood of implementation. Mastodon is not Google. It can't throw dozens of developers at a project.

@TimothyRichardGreen
Copy link

Should this be split into two separate discussions? People are talking over each other.

  1. Mastodon should stop stripping HTML on messages from other parts of the Fediverse. It should sanitize (otherwise it would allow XSS attacks), and perhaps simplify (stripping out colours or fonts, and embedded CSS or javascript, probably), but at least some formatting should be allowed through.
  2. Mastodon should allow formatting itself, probably using a subset of CommonMark.

Those are two separate conversations, and having both at once is causing confusion. (For what it's worth, I'd vote yes on both of them.)

@dertuxmalwieder
Copy link

Good idea, actually. :-)

@spaceottercode
Copy link

spaceottercode commented Feb 9, 2023

Would be nice to have some level of support for the display and drafting of Markdown/commonmark. And should be possible to do incrementally. I mean to say, with display being addressed first, and only tackling a subset. But I think with time people will eventually want to replicate what they see. Eventually drafting facilities could help testing too. I just hope it's something we get to see/use on the official web interface too as opposed to 3rd party client apps only. 🤞

@ThatOneCalculator
Copy link

ThatOneCalculator commented Feb 22, 2023

What about MFM? It's a markdown format that's already popular on the Fediverse and implements most markdown items, and is used on Misskey, Calckey, Akkoma, and more.

@VyrCossont
Copy link
Contributor

What about MFM? It's a markdown format that's already popular on the Fediverse and implements most markdown items, and is used on Misskey, Calckey, Akkoma, and more.

Why implement something with no spec, no Ruby implementation, and no user base outside of Misskey? The easiest option would be to merge Glitch's rendering implementation, since that's pretty well tested and widely deployed already.

@cam-rod
Copy link

cam-rod commented Feb 22, 2023

Why implement something with no spec, no Ruby implementation, and no user base outside of Misskey? The easiest option would be to merge Glitch's rendering implementation, since that's pretty well tested and widely deployed already.

It looks like Glitch uses Redcarpet, which isn't compatible with CommonMark (see vmg/redcarpet#429) and seems to be in maintenance mode. It might make sense to use something based on CommonMark (or flavours of it).

But using other components from Glitch would be great.

EDIT: one implementation mentioned in that issue is commonmarker, a Ruby wrapper for GitHub-Flavoured Markdown.

@Freeplayg Freeplayg changed the title Mastodon can't just choose to not add markdown anymore. Mastodon can't just choose to not show markdown anymore. Feb 22, 2023
@ghost
Copy link

ghost commented Mar 5, 2023

can mastodon just add old html tags like <blink> or <marquee> like i did on my site?

@McPringle
Copy link

can mastodon just add old html tags like <blink> or <marquee> like i did on my site?

Hopefully not! 😱

@cam-rod
Copy link

cam-rod commented Mar 6, 2023

Seeing that rich text support was added in #23913, this covers the core parts of Markdown:

  • Bold, italics, strikethrough
  • Ordered and unordered lists
  • Blockquotes, inline code, and fenced code blocks
  • Headers (formatted as bold text in separate paragraphs)

It basically fixes the original point of this issue. As for posting with Markdown, I've opened #23981 to continue that discussion.

@ghost
Copy link

ghost commented Mar 9, 2023

can mastodon just add old html tags like <blink> or <marquee> like i did on my site?

Hopefully not! 😱

why not?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion Feature suggestion
Projects
None yet
Development

No branches or pull requests