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

Code blocks in federated Mastodon posts have mangled line breaks #1480

Open
pbackus opened this issue Feb 23, 2025 · 1 comment
Open

Code blocks in federated Mastodon posts have mangled line breaks #1480

pbackus opened this issue Feb 23, 2025 · 1 comment
Labels
activitypub ActivityPub related issues backend Backend related issues and pull requests bug Something isn't working

Comments

@pbackus
Copy link

pbackus commented Feb 23, 2025

Describe the bug

In microblog posts federated from Mastodon posts, line breaks are displayed as <br></br>.

On which Mbin instance did you find the bug?

fedia.io

Which Mbin version was running on the instance?

1.8.0

To Reproduce

  1. View the post at https://fedia.io/m/random/p/1589011/from-a-hypothetical-stdlib-where-things-are-not-bad-br-br-typedef
  2. View the original post at https://pony.social/@thephd/114047042998822286
  3. Observe that the line breaks in the original post's code block have been replaced with <br></br> in the Mbin version.

Expected behavior

The code block should be formatted the same way on both Mbin and the original instance.

Screenshots

Mbin version:

Image

Original version:

Image

Desktop (please complete the following information):

  • OS: Debian
  • Browser: Firefox
  • Browser Version: 135.0b7
@pbackus pbackus added the bug Something isn't working label Feb 23, 2025
@BentiGorlich BentiGorlich added backend Backend related issues and pull requests activitypub ActivityPub related issues labels Feb 24, 2025
@BentiGorlich
Copy link
Member

This is probably a problem with out html to markdown parser. Mastodon does not share the markdown source, only the generated html from it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
activitypub ActivityPub related issues backend Backend related issues and pull requests bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants