FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add spaceMatching setting that matches all spaces by berarma · Pull Request #111 · caxy/php-htmldiff · GitHub

Add spaceMatching setting that matches all spaces - #111

Merged
jschroed91 merged 1 commit into
caxy:masterfrom
berarma:space-matching
Nov 5, 2023
Merged

Add spaceMatching setting that matches all spaces#111
jschroed91 merged 1 commit into
caxy:masterfrom
berarma:space-matching

Conversation

berarma commented Aug 4, 2022

Copy link
Copy Markdown
Contributor

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.

jschroed91 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

jschroed91 merged commit de416bc into caxy:master Nov 5, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL