html-minifier-next 4.3.0 → 4.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/cli.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -122,10 +122,10 @@ Options can be used in config files (camelCase) or via CLI flags (kebab-case wit
|
|
|
122
122
|
| `customEventAttributes`<br>`--custom-event-attributes` | Arrays of regexes that allow to support custom event attributes for `minifyJS` (e.g., `ng-click`) | `[ /^on[a-z]{3,}$/ ]` |
|
|
123
123
|
| `customFragmentQuantifierLimit`<br>`--custom-fragment-quantifier-limit` | Set maximum quantifier limit for custom fragments to prevent ReDoS attacks | `200` |
|
|
124
124
|
| `decodeEntities`<br>`--decode-entities` | Use direct Unicode characters whenever possible | `false` |
|
|
125
|
-
| `html5`<br>`--no-html5` | Parse input according to the HTML specification | `true` |
|
|
125
|
+
| `html5`<br>`--no-html5` | Parse input according to the HTML specification; when `false`, uses a more lenient parser | `true` |
|
|
126
126
|
| `ignoreCustomComments`<br>`--ignore-custom-comments` | Array of regexes that allow to ignore certain comments, when matched | `[ /^!/, /^\s*#/ ]` |
|
|
127
127
|
| `ignoreCustomFragments`<br>`--ignore-custom-fragments` | Array of regexes that allow to ignore certain fragments, when matched (e.g., `<?php … ?>`, `{{ … }}`, etc.) | `[ /<%[\s\S]*?%>/, /<\?[\s\S]*?\?>/ ]` |
|
|
128
|
-
| `includeAutoGeneratedTags`<br>`--no-include-auto-generated-tags` | Insert elements generated by HTML parser | `true` |
|
|
128
|
+
| `includeAutoGeneratedTags`<br>`--no-include-auto-generated-tags` | Insert elements generated by HTML parser; when `false`, omits auto-generated tags | `true` |
|
|
129
129
|
| `inlineCustomElements`<br>`--inline-custom-elements` | Array of names of custom elements which are inline | `[]` |
|
|
130
130
|
| `keepClosingSlash`<br>`--keep-closing-slash` | Keep the trailing slash on void elements | `false` |
|
|
131
131
|
| `maxInputLength`<br>`--max-input-length` | Maximum input length to prevent ReDoS attacks (disabled by default) | `undefined` |
|
package/cli.js
CHANGED
|
@@ -121,17 +121,17 @@ const mainOptions = {
|
|
|
121
121
|
collapseInlineTagWhitespace: 'Don’t leave any spaces between “display: inline;” elements when collapsing—use with “collapseWhitespace=true”',
|
|
122
122
|
collapseWhitespace: 'Collapse whitespace that contributes to text nodes in a document tree',
|
|
123
123
|
conservativeCollapse: 'Always collapse to 1 space (never remove it entirely)—use with “collapseWhitespace=true”',
|
|
124
|
-
continueOnMinifyError: '
|
|
124
|
+
continueOnMinifyError: 'Abort on minification errors',
|
|
125
125
|
continueOnParseError: 'Handle parse errors instead of aborting',
|
|
126
126
|
customAttrAssign: ['Arrays of regexes that allow to support custom attribute assign expressions (e.g., “<div flex?="{{mode != cover}}"></div>”)', parseJSONRegExpArray],
|
|
127
127
|
customAttrCollapse: ['Regex that specifies custom attribute to strip newlines from (e.g., /ng-class/)', parseRegExp],
|
|
128
128
|
customAttrSurround: ['Arrays of regexes that allow to support custom attribute surround expressions (e.g., “<input {{#if value}}checked="checked"{{/if}}>”)', parseJSONRegExpArray],
|
|
129
129
|
customEventAttributes: ['Arrays of regexes that allow to support custom event attributes for minifyJS (e.g., “ng-click”)', parseJSONRegExpArray],
|
|
130
130
|
decodeEntities: 'Use direct Unicode characters whenever possible',
|
|
131
|
-
html5: '
|
|
131
|
+
html5: 'Don’t parse input according to the HTML specification',
|
|
132
132
|
ignoreCustomComments: ['Array of regexes that allow to ignore certain comments, when matched', parseJSONRegExpArray],
|
|
133
133
|
ignoreCustomFragments: ['Array of regexes that allow to ignore certain fragments, when matched (e.g., “<?php … ?>”, “{{ … }}”)', parseJSONRegExpArray],
|
|
134
|
-
includeAutoGeneratedTags: '
|
|
134
|
+
includeAutoGeneratedTags: 'Don’t insert elements generated by HTML parser',
|
|
135
135
|
inlineCustomElements: ['Array of names of custom elements which are inline', parseJSONArray],
|
|
136
136
|
keepClosingSlash: 'Keep the trailing slash on void elements',
|
|
137
137
|
maxInputLength: ['Maximum input length to prevent ReDoS attacks', parseValidInt('maxInputLength')],
|
package/package.json
CHANGED