Skip to content

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

2 participants