minify-html-literals
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -5,2 +5,10 @@ # Change Log | ||
<a name="1.1.1"></a> | ||
## [1.1.1](https://github.com/asyncLiz/minify-html-literals/compare/v1.1.0...v1.1.1) (2018-10-25) | ||
### Bug Fixes | ||
- fail to minify with <style> placeholders ([64b9b6f](https://github.com/asyncLiz/minify-html-literals/commit/64b9b6f)) | ||
<a name="1.1.0"></a> | ||
@@ -7,0 +15,0 @@ |
{ | ||
"name": "minify-html-literals", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Minify HTML template literal strings", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -27,7 +27,8 @@ "use strict"; | ||
getPlaceholder(parts) { | ||
let placeholder = 'TEMPLATE_EXPRESSION'; | ||
while (parts.some(part => part.text.includes(placeholder))) { | ||
const suffix = '();'; | ||
let placeholder = '@TEMPLATE_EXPRESSION'; | ||
while (parts.some(part => part.text.includes(placeholder + suffix))) { | ||
placeholder += '_'; | ||
} | ||
return placeholder; | ||
return placeholder + suffix; | ||
}, | ||
@@ -34,0 +35,0 @@ combineHTMLStrings(parts, placeholder) { |
@@ -74,8 +74,9 @@ import { Options, minify } from 'html-minifier'; | ||
getPlaceholder(parts: TemplatePart[]): string { | ||
let placeholder = 'TEMPLATE_EXPRESSION'; | ||
while (parts.some(part => part.text.includes(placeholder))) { | ||
const suffix = '();'; | ||
let placeholder = '@TEMPLATE_EXPRESSION'; | ||
while (parts.some(part => part.text.includes(placeholder + suffix))) { | ||
placeholder += '_'; | ||
} | ||
return placeholder; | ||
return placeholder + suffix; | ||
}, | ||
@@ -82,0 +83,0 @@ combineHTMLStrings(parts: TemplatePart[], placeholder: string): string { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45267
821