From 0d937233d34a16e5189e04fa9fdabd3aa0e3d140 Mon Sep 17 00:00:00 2001 From: Duncan Beevers Date: Thu, 11 Dec 2014 16:20:50 -0600 Subject: [PATCH] Add section to README regarding special-case SVG --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 30f3ca9..7e08ae3 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ How does HTMLMinifier compare to [another solution](http://www.willpeavy.com/min | `removeEmptyElements` | [Remove all elements with empty contents](http://perfectionkills.com/experimenting-with-html-minifier/#remove_empty_elements) | `false` | | `lint` | [Toggle linting](http://perfectionkills.com/experimenting-with-html-minifier/#validate_input_through_html_lint) | `false` | | `keepClosingSlash` | Keep the trailing slash on singleton elements | `false` | -| `caseSensitive` | Treat attributes in case sensitive manner (useful for SVG; e.g. viewBox) | `false` | +| `caseSensitive` | Treat attributes in case sensitive manner (useful for custom html tags.) | `false` | | `minifyJS` | Minify Javascript in script elements and on* attributes (uses [UglifyJS](https://github.com/mishoo/UglifyJS2)) | `false` (could be `true`, `false`, `Object` (options)) | | `minifyCSS` | Minify CSS in style elements and style attributes (uses [clean-css](https://github.com/GoalSmashers/clean-css)) | `false` (could be `true`, `false`, `Object` (options)) | | `minifyURLs` | Minify URLs in various attributes (uses [relateurl](https://github.com/stevenvachon/relateurl)) | `false` (could be `Object` (options)) | @@ -58,8 +58,15 @@ How does HTMLMinifier compare to [another solution](http://www.willpeavy.com/min | `customAttrSurround` | Arrays of regex'es that allow to support custom attribute surround expressions (e.g. ``) | `[ ]` | | `customAttrCollapse` | Regex that specifies custom attribute to strip newlines from (e.g. `/ng\-class/`) | | +## Special cases -Chunks of markup can be ignored by wrapping them with ``. +### Ignoring chunks of markup. + +If you have chunks of markup you would like preserved, you can wrap them ``. + +### Preserving SVG tags + +SVG tags are automatically recognized, and when they are minified, both case-sensitivity and closing-slashes are preserved, regardless of the minification settings used for the rest of the file. ## Installation Instructions -- 2.34.1