diff --git a/CHANGELOG.md b/CHANGELOG.md index ff63c14..25542aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,20 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [1.1.0] - 2021-09-19 +### Added +- Collapse missing value default attribute in `removeRedundantAttributes` [#158]. +- New `normalizeAttributeValues` module to normalize casing of attribute values [#163]. +- Custom matcher for `removeComments` [#156]. + +### Changed +- Remove more empty attributes in `removeEmptyAttributes` [#161]. +- Enhance collapse whitespace in `collapseWhitespace` [#145]. +- `minifyJs` and `minifyUrls` enhancement [#159]. +- Enhance attribute collapse whitespace in `collapseAttributeWhitespace` [#157]. + + + ## [1.0.1] - 2021-09-11 ### Added - Support of [@novaatwarren/uncss](https://github.com/novaatwarren/uncss) fork [#154] @@ -205,6 +219,7 @@ Otherwise, you have to adapt the config according to the new [PurgeCSS@3](https: - Remove attributes that contains only white spaces. +[1.1.0]: https://github.com/posthtml/htmlnano/compare/1.0.1...1.1.0 [1.0.1]: https://github.com/posthtml/htmlnano/compare/1.0.0...1.0.1 [1.0.0]: https://github.com/posthtml/htmlnano/compare/0.2.9...1.0.0 [0.2.9]: https://github.com/posthtml/htmlnano/compare/0.2.8...0.2.9 @@ -228,8 +243,15 @@ Otherwise, you have to adapt the config according to the new [PurgeCSS@3](https: [0.1.2]: https://github.com/posthtml/htmlnano/compare/0.1.1...0.1.2 [0.1.1]: https://github.com/posthtml/htmlnano/compare/0.1.0...0.1.1 +[#163]: https://github.com/posthtml/htmlnano/issues/163 +[#161]: https://github.com/posthtml/htmlnano/issues/161 +[#159]: https://github.com/posthtml/htmlnano/issues/159 +[#158]: https://github.com/posthtml/htmlnano/issues/158 +[#157]: https://github.com/posthtml/htmlnano/issues/157 +[#156]: https://github.com/posthtml/htmlnano/issues/156 [#154]: https://github.com/posthtml/htmlnano/issues/154 [#153]: https://github.com/posthtml/htmlnano/issues/153 +[#145]: https://github.com/posthtml/htmlnano/issues/145 [#135]: https://github.com/posthtml/htmlnano/issues/135 [#129]: https://github.com/posthtml/htmlnano/issues/129 [#125]: https://github.com/posthtml/htmlnano/issues/125 @@ -243,10 +265,10 @@ Otherwise, you have to adapt the config according to the new [PurgeCSS@3](https: [#112]: https://github.com/posthtml/htmlnano/issues/112 [#111]: https://github.com/posthtml/htmlnano/issues/111 [#110]: https://github.com/posthtml/htmlnano/issues/110 -[#107]: https://github.com/posthtml/htmlnano/issues/107 [#108]: https://github.com/posthtml/htmlnano/issues/108 -[#102]: https://github.com/posthtml/htmlnano/issues/102 +[#107]: https://github.com/posthtml/htmlnano/issues/107 [#104]: https://github.com/posthtml/htmlnano/issues/104 +[#102]: https://github.com/posthtml/htmlnano/issues/102 [#98]: https://github.com/posthtml/htmlnano/issues/98 [#95]: https://github.com/posthtml/htmlnano/issues/95 [#94]: https://github.com/posthtml/htmlnano/issues/94 diff --git a/docs/versioned_docs/version-1.0.1/010-introduction.md b/docs/versioned_docs/version-1.1.0/010-introduction.md similarity index 100% rename from docs/versioned_docs/version-1.0.1/010-introduction.md rename to docs/versioned_docs/version-1.1.0/010-introduction.md diff --git a/docs/versioned_docs/version-1.0.1/020-usage.md b/docs/versioned_docs/version-1.1.0/020-usage.md similarity index 100% rename from docs/versioned_docs/version-1.0.1/020-usage.md rename to docs/versioned_docs/version-1.1.0/020-usage.md diff --git a/docs/versioned_docs/version-1.0.1/030-config.md b/docs/versioned_docs/version-1.1.0/030-config.md similarity index 100% rename from docs/versioned_docs/version-1.0.1/030-config.md rename to docs/versioned_docs/version-1.1.0/030-config.md diff --git a/docs/versioned_docs/version-1.0.1/040-presets.md b/docs/versioned_docs/version-1.1.0/040-presets.md similarity index 100% rename from docs/versioned_docs/version-1.0.1/040-presets.md rename to docs/versioned_docs/version-1.1.0/040-presets.md diff --git a/docs/versioned_docs/version-1.0.1/050-modules.md b/docs/versioned_docs/version-1.1.0/050-modules.md similarity index 90% rename from docs/versioned_docs/version-1.0.1/050-modules.md rename to docs/versioned_docs/version-1.1.0/050-modules.md index e402b1b..d48d8cd 100644 --- a/docs/versioned_docs/version-1.0.1/050-modules.md +++ b/docs/versioned_docs/version-1.1.0/050-modules.md @@ -10,12 +10,12 @@ Collapse redundant white spaces in list-like attributes (`class`, `rel`, `ping`) #### Example Source: ```html -
+ ``` Minified: ```html - + ``` @@ -80,18 +80,68 @@ Minified: #### Options - `safe` – removes all HTML comments except the conditional comments and [``](https://yandex.com/support/webmaster/controlling-robot/html.xml) (default) - `all` — removes all HTML comments +- A `RegExp` — only HTML comments matching the given regexp will be removed. +- A `Function` that returns boolean — removes HTML comments that can make the given callback function returns truthy value. #### Example + Source: + +```js +{ + removeComments: 'all' +} +``` + ```html ``` Minified: + ```html ``` +Source: + +```js +{ + removeComments: // +} +``` + +```html +