Skip to content

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