Skip to content

Commit

Permalink
Fix(posthtml#180): exclude "sizes" from attributesWithLists
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW committed Apr 1, 2022
1 parent 2a6ad50 commit 137156c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/modules/collapseAttributeWhitespace.es6
Original file line number Diff line number Diff line change
Expand Up @@ -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 <img> should not be modified, while "sizes" of <link> will only have one entry in most cases.
*/
// 'sizes', // link
'headers' // td, th
]);

Expand Down

0 comments on commit 137156c

Please sign in to comment.