Skip to content

Add support for posting with Markdown syntax #23981

@jessicarod7

Description

@jessicarod7

Pitch

Requests to add support for posting with Markdown formatting has come up many times in the past, so this is a proposal to formalize the recent efforts. I'm not against other forms of markup formatting, but am focusing this issue specifically on Markdown.

My understanding is that Markdown support has not been fully approved or denied. The previous PR in #10787 (based on issue #853) seems to have been rejected due to issues in the implementation (and a somewhat derailed discussion). Issues #13544 and #21643 are similar, but cover subsections of this larger topic. I consider this a continuation of the conversation in #18958.

Two main points stand out:

  • Is there general agreement to add Markdown support? I think clearing up this question first will avoid the conflicts that appeared in the rejected PR.
  • If yes, how should Markdown be implemented?
    • Markdown flavour: Depending on the user, they might be coming from CommonMark, the GitHub-Flavoured derivative, Reddit (where New Reddit is different from Old), Misskey, Redcarpet, or the original spec, to name a few. One of these needs to be selected to avoid issues from mixing them.
    • Scope: Supporting all of Markdown would be a massive effort and massively increase risks of security vulnerabilities, so a subset of Markdown would be used. The rich text support added in Add support for incoming rich text #23913 is a good starting point.
    • Locations: In addition to posts, should support be added to other places, like profiles? A small point, but it can matter (ex. supporting Markdown in profile metadata, but not display names)

Motivation

With proper support for markup syntax, users can emphasize key points, format code snippets, create lists, or quote blog posts. It allows a message to be more expressive, similar to custom emojis. Adding support also means that users will no longer have to emulate the use of markup syntax:

I would like to make **this point clear.**

This means the content of the message is properly formatted into HTML, and can be interpreted by screen readers and other accessibility tools. It then displays as formatted on other servers, like Misskey and Akkoma.

Edit to quote a reply I made in the rich-text PR:

Agreed that HTML should remain the main way of transferring messages. When supporting other types of formatting, we should use the existing definition in the ActivityPub spec, section 3.3. The source field stores the original formatting, with a Content-Type like text/markdown, and then the posting client is expected to convert to HTML for the content field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions