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

Prevent space between merged tags of the same type #36

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

rob-3
Copy link
Contributor

@rob-3 rob-3 commented Feb 7, 2024

Fixes #35.

I was a little unsure about the change on line 365 - the tests pass with or without it, but it seemed right to also change it. Maybe you can shed some light on what that if does.

@matthiask matthiask merged commit b755b52 into matthiask:main Feb 7, 2024
4 checks passed
@matthiask
Copy link
Owner

Makes sense!

I think len(element) checks whether the tag contains subelements or something -- to be honest I don't remember the details. It appends the text of the next element either to the tail of the last subelement of itself or to its own text content.

@rob-3
Copy link
Contributor Author

rob-3 commented Feb 7, 2024

Great - thanks for the extremely fast response on this. Do you know when this change will land on PyPI?

@matthiask
Copy link
Owner

https://pypi.org/project/html-sanitizer/

Just now :)

Thank you!

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.

Merging tags inserts a space between them
2 participants