Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

minify-html-literals

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minify-html-literals - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

8

CHANGELOG.md

@@ -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 @@

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc