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

To much empty lines in post #4663

Closed
Offerel opened this issue Sep 10, 2024 · 3 comments · Fixed by #4672
Closed

To much empty lines in post #4663

Offerel opened this issue Sep 10, 2024 · 3 comments · Fixed by #4672
Labels

Comments

@Offerel
Copy link

Offerel commented Sep 10, 2024

Detailed description

There seems to be to much space or empty lines in some posts, so that they look strange. Example post: https://pixelfed.social/p/nhoizey/739018826511637678

Expected look:
Screenshot_20240910_103225

in Tusky:
Screenshot_20240910_103602_Tusky

Steps to reproduce the problem

...

Debug information

Tusky 26.1 F-Droid

@Offerel Offerel added the bug label Sep 10, 2024
@connyduck
Copy link
Collaborator

connyduck commented Sep 10, 2024

Oh no, this is a tricky one.
The think is, Pixelfed seems to use both newlines and <br/> tags, while Mastodon usually only has <br/> tags.
Tusky displays both because there are other edge cases where this is necessary. Ignoring newlines would fix this issue, but cause problems elsewhere. 😕

Thanks for reporting though, I'll see if something can be done that works in all cases.

@Offerel
Copy link
Author

Offerel commented Sep 10, 2024

I assume tusky converts <br/> to newline or newline to be <br/>. If a double newline or <br/> is removed after this conversion or it detects a newline followed by <br/>, the extra newline should be ignored.

In my opinion, it should be a rare case, that a newline followed by a <br/> is intentionally. But if you have multiple <br/>, this could be a wanted double newline. At least this is how I would handle that for example in my Primitivenotes Project. But that's PHP and a complete other story.

@connyduck
Copy link
Collaborator

@Offerel very good idea, thx

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

Successfully merging a pull request may close this issue.

2 participants