diff --git a/lib/modules/collapseAttributeWhitespace.es6 b/lib/modules/collapseAttributeWhitespace.es6 index 57f190e..30dcbee 100644 --- a/lib/modules/collapseAttributeWhitespace.es6 +++ b/lib/modules/collapseAttributeWhitespace.es6 @@ -6,7 +6,13 @@ export const attributesWithLists = new Set([ 'rel', // a, area, link 'ping', // a, area 'sandbox', // iframe - 'sizes', // link + /** + * https://github.com/posthtml/htmlnano/issues/180 + * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-sizes + * + * "sizes" of should not be modified, while "sizes" of will only have one entry in most cases. + */ + // 'sizes', // link 'headers' // td, th ]); diff --git a/test/modules/sortAttributesWithLists.js b/test/modules/sortAttributesWithLists.js index 1596c33..fd3ab7d 100644 --- a/test/modules/sortAttributesWithLists.js +++ b/test/modules/sortAttributesWithLists.js @@ -11,6 +11,16 @@ describe('sortAttributesWithLists', () => { ); }); + it('issue #180', () => { + return init( + '', + '', + { + sortAttributesWithLists: 'alphabetical', + } + ); + }); + it('frequency', () => { return init( '
',