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

Add spaceMatching setting that matches all spaces #111

Merged
merged 1 commit into from
Nov 5, 2023

Conversation

berarma
Copy link
Contributor

@berarma berarma commented Aug 4, 2022

This feature tries to provide a fix for #109. It adds a setting spaceMatching which can be set to true so spaces aren't ignored at all.

The HTML provided needs to have the meaningless spaces removed beforehand so only the spaces that we want to compare are present. I think this is more easily done by the developer using the library since it knows more about the HTML being used. The case were I want to apply it is for the code generated by a HTML editor that allows a limited set of tags with predefined layout behavior.

I've added some test cases. I haven't tested the code out of these test cases but I think it will serve my purposes well. I've created the PR so it makies its way while I get to implement it on my project. I might have overlooked something and the naming could probably be better so please make suggestions.

Thanks.

Copy link
Member

@jschroed91 jschroed91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! We will get this merged and included in next release

@jschroed91 jschroed91 merged commit de416bc into caxy:master Nov 5, 2023
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 this pull request may close these issues.

2 participants