minify_html 0.13.3-x86_64-linux → 0.14.0-x86_64-linux

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 562ba219dd8411cce923075fc0a977d007ea1cbe30e5651bb61ea9593f5cea1b
4
- data.tar.gz: fee85c6a15c08b0cee35a3139a5233fa4e1448ab6dc53193d4318d1a24ea4315
3
+ metadata.gz: c892e203b71b1e4d9663c46849f19f1883a9d0856fb9b3f2948dd05f1f18db81
4
+ data.tar.gz: 1cf7f42138ad6b279582de803e63296791aa9642b548e9e2d21ed3853f2afc5a
5
5
  SHA512:
6
- metadata.gz: 56d8f9a3537498ca667dd8f9c352dcb478e6af4c5724691db5ab0364775760089cc56d614d04d4bc9586a62801002512116b525c918f5571f298c27433a2eea0
7
- data.tar.gz: 6f0ee0100beccc60a3d5308f983e3074b732a36c0f1f800c7fff9d246322710d50482cb3b9c9b8d1c43b6b0a0c6997de5c8689280b7000461e6e7ddffdf54deb
6
+ metadata.gz: de53643c15d28cead8ba50e67d774998d1a67345d5626547de554e03021c67e852f1150949427ac8673c502e1fc0e2c09eebd99b4d7d0810154fd3dcf0bdffe0
7
+ data.tar.gz: 999068dbe1c24a09449ccf6a019cff8ffe550649d671995a03e2fff45ed137a4d6b92f7e0f03da0cbf294d63d800e6e8a9e75478537a4d892c838baa91582160
data/README.md CHANGED
@@ -23,7 +23,7 @@ View the [changelog](./CHANGELOG.md) to see the latest updates.
23
23
 
24
24
  Comparison with [html-minifier](https://github.com/kangax/html-minifier) and [minimize](https://github.com/Swaagie/minimize), run on the top web pages. [See the breakdown here.](./bench)
25
25
 
26
- <img width="400" alt="Chart showing speed of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.13.3/core/average-speeds.png"><img width="400" alt="Chart showing compression of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.13.3/core/average-sizes.png">
26
+ <img width="400" alt="Chart showing speed of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.14.0/core/average-speeds.png"><img width="400" alt="Chart showing compression of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.14.0/core/average-sizes.png">
27
27
 
28
28
  The [onepass](https://github.com/wilsonzlin/minify-html/tree/master/rust/onepass) variant is even more optimised for speed. See its [README](https://github.com/wilsonzlin/minify-html/tree/master/rust/onepass) for more details.
29
29
 
@@ -61,7 +61,7 @@ minhtml --keep-closing-tags --minify-css /path/to/**/*.html
61
61
 
62
62
  ```toml
63
63
  [dependencies]
64
- minify-html = "0.13.3"
64
+ minify-html = "0.14.0"
65
65
  ```
66
66
 
67
67
  ### Use
@@ -73,14 +73,14 @@ Check out the [docs](https://docs.rs/minify-html) for API and usage examples.
73
73
  <details>
74
74
  <summary><img width="24" src="https://wilsonl.in/minify-html/icon/deno.png"> <strong>Deno</strong></summary>
75
75
 
76
- - Package: https://wilsonl.in/minify-html/deno/0.13.3/index.js
76
+ - Package: https://wilsonl.in/minify-html/deno/0.14.0/index.js
77
77
  - Binding: [WASM](https://webassembly.org/)
78
78
  - Platforms: All
79
79
 
80
80
  ### Use
81
81
 
82
82
  ```ts
83
- import init, {minify} from "https://wilsonl.in/minify-html/deno/0.13.3/index.js";
83
+ import init, {minify} from "https://wilsonl.in/minify-html/deno/0.14.0/index.js";
84
84
 
85
85
  const encoder = new TextEncoder();
86
86
  const decoder = new TextDecoder();
@@ -146,7 +146,7 @@ Add as a Maven dependency:
146
146
  <dependency>
147
147
  <groupId>in.wilsonl.minifyhtml</groupId>
148
148
  <artifactId>minify-html</artifactId>
149
- <version>0.13.3</version>
149
+ <version>0.14.0</version>
150
150
  </dependency>
151
151
  ```
152
152
 
@@ -240,6 +240,14 @@ All [`Cfg` fields](https://docs.rs/minify-html/latest/minify_html/struct.Cfg.htm
240
240
 
241
241
  </details>
242
242
 
243
+ ## Templating syntax
244
+
245
+ minify-html can parse and preserve `{{`/`{%`/`{#` and `<%` syntax in the source code, which allows minification of many HTML templates written for most engines like Pebble, Mustache, Django, Go, Jinja, Twix, Nunjucks, Handlebars, Sailfish, JSP, EJS, and ERB. Look for the `preserve_*_template_syntax` Cfg options.
246
+
247
+ PHP blocks (`<?php` or `<?=`) also happen to be processing instructions, which are preserved by default.
248
+
249
+ Note that in all of these syntax, the parsing is "dumb": it will simply look for the next subsequence of characters that match the closing delimiter. This may cause issues if nesting or string literals appear inside these blocks, but this should be rare.
250
+
243
251
  ## Minification
244
252
 
245
253
  Note that some of the minification done can result in HTML that will not pass validation, but remain interpreted and rendered correctly by the browser; essentially, the laxness of the browser is taken advantage of for better minification. To prevent this, refer to these configuration options:
Binary file
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minify_html
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.3
4
+ version: 0.14.0
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Wilson Lin