# Modules
By default the modules should only perform safe transforms, see the module documentation below for details.
You can disable modules by passing `false` as option, and enable them by passing `true`.
### collapseAttributeWhitespace
Collapse redundant white spaces in list-like attributes (`class`, `rel`, `ping`).
#### Example
Source:
```html
```
Minified:
```html
```
### collapseWhitespace
Collapses redundant white spaces (including new lines). It doesn’t affect white spaces in the elements `
```
Minified (with `all`):
```html
```
### deduplicateAttributeValues
Remove duplicate values from list-like attributes (`class`, `rel`, `ping`).
#### Example
Source:
```html
```
Minified:
```html
```
### removeComments
#### 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
this text will not be indexedLorem ipsum dolor sit ametLorem ipsum dolor sit amet
```
Minified:
```html
this text will not be indexedLorem ipsum dolor sit ametLorem ipsum dolor sit amet
this text will not be indexedLorem ipsum dolor sit ametLorem ipsum dolor sit amet
```
Minified:
```html
this text will not be indexedLorem ipsum dolor sit ametLorem ipsum dolor sit amet
```
### removeEmptyAttributes
Removes empty [safe-to-remove](https://github.com/posthtml/htmlnano/blob/master/lib/modules/removeEmptyAttributes.es6) attributes.
#### Side effects
This module could break your styles or JS if you use selectors with attributes:
```CSS
img[style=""] {
margin: 10px;
}
```
#### Example
Source:
```html
```
Minified:
```html
```
### removeAttributeQuotes
Remove quotes around attributes when possible, see [HTML Standard - 12.1.2.3 Attributes - Unquoted attribute value syntax](https://html.spec.whatwg.org/multipage/syntax.html#attributes-2).
#### Example
Source:
```html
```
Minified:
```html
```
#### Notice
The feature is implemented by [posthtml-render's `quoteAllAttributes`](https://github.com/posthtml/posthtml-render#options), which is one of the PostHTML's option. So `removeAttributeQuotes` could be overriden by other PostHTML's plugins and PostHTML's configuration.
For example:
```js
posthtml([
htmlnano({
removeAttributeQuotes: true
})
]).process(html, {
quoteAllAttributes: true
})
```
`removeAttributeQuotes` will not work because PostHTML's `quoteAllAttributes` takes the priority.
### removeUnusedCss
Removes unused CSS inside `
```
Optimized:
```html