attrValue = cleanAttributeValue(tag, attrName, attrValue, options, attrs);
+ if (options.removeEmptyAttributes &&
+ canDeleteEmptyAttribute(tag, attrName, attrValue)) {
+ return '';
+ }
+
if (attrValue !== undefined && !options.removeAttributeQuotes ||
!canRemoveAttributeQuotes(attrValue)) {
emittedAttrValue = attrQuote + attrValue + attrQuote;
emittedAttrValue = attrValue;
}
- if (options.removeEmptyAttributes &&
- canDeleteEmptyAttribute(tag, attrName, attrValue)) {
- return '';
- }
-
if (attrValue === undefined || (options.collapseBooleanAttributes &&
isBooleanAttribute(attrName, attrValue))) {
attrFragment = attrName;