kangax/html-minifier — pull request #27 by crcn (2012-02-29 07:00:21+00:00)
Title: customizable canTrimWhitespace & canCollapseWhitespace

A good use case is minifying inline templates. For example:

```javascript
function canRemoveWhitespace(tag, attrs) {

if(tag != 'script') return false;

for (var i = attrs.length; i--;) {

var attr = attrs[i];

if (attr.name == 'type' && attr.value.match(/text\/x-tmpl-\w+/)) {
return true;
}
}

return false;
}

return minify(content, {
collapseWhitespace: true,
canTrimWhitespace: canRemoveWhitespace,
canCollapseWhitespace: canRemoveWhitespace
});
```

Could minify the `text/x-tmpl-mu` script here:

```html

```