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

Added option ignoreEmptyAttributes: ignores attributes with empty values #159

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dtom90
Copy link

@dtom90 dtom90 commented May 30, 2019

ignoreEmptyAttributes: Boolean

Makes html-differ ignore tags' attributes with empty values during the comparison.

From the list of the same tag's attributes, the attributes which have empty values will be ignored (default: false).

Example: true

For example, the following two code samples will be considered to be equivalent:

<div style=""></div>
<div></div>

This option can also be used to completely ignore attributes specified by the ignoreAttributes option, even if they are present in one example, but not in the other.

Example: ignoreAttributes: ['id', 'for'], ignoreEmptyAttributes: true

For example, the following two code samples will be considered to be equivalent:

<label for="random">label for input</label>
<input id="random">
<label>label for input</label>
<input>

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