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

Markdown Statuses #116

Merged
merged 2 commits into from
Jul 26, 2021
Merged

Markdown Statuses #116

merged 2 commits into from
Jul 26, 2021

Conversation

tsmethurst
Copy link
Contributor

This PR adds functionality for parsing statuses in markdown format, using https://github.com/russross/blackfriday.

To submit a status in markdown format, a new field must be set when submitting a status through the api:

	// Format in which to parse the submitted status.
	// Can be either plain or markdown. Empty will default to plain.
	Format StatusFormat `form:"format" json:"format" xml:"format"`

In other words, when doing a POST request to /api/v1/statuses you can now include something like -F format=markdown or -F format=plain to specify what kind of status you're submitting and how you'd like it to be parsed.

To avoid breaking anything, the default behavior when the field is not specified is to assume plaintext.

Unfortunately, no clients yet support this functionality (as far as I'm aware). But it should be useful when submitting statuses through the API, and hopefully this functionality can be added to some clients in the future :)

Note: to avoid completely breaking federation with spammy, weird-looking posts, table-formatting is not supported, because tests showed that it looked terrible in other apps (Mastodon).

Closes #110

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

Successfully merging this pull request may close these issues.

Feature request: Markdown support
1 participant