Skip to content

Fix element margins inside posts and comments #413

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ButteredCats
Copy link
Contributor

There was inconsistent margins between different types of elements, and headings had no margins at all. This fixes that.

It also removes odd paragraphs that only had a zero width space inside of them that could add large gaps between items. Not really sure if these are user placed or not, but somehow Reddit is able to have the margins on these not interrupt their formatting so I figured it's best to remove them. The code for this is just inside of rewrite_urls() because I couldn't find a better spot for it but that definitely doesn't fit the name of the function so suggestions on a better place are certainly welcome.

Screenshots below from: /r/linux/comments/1k2ilrt/configuring_persistent_network_routing_and/

Before:
Screenshot_20250419_151302

After:
Screenshot_20250419_151330

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.

1 participant