minify_html 0.13.3-arm64-darwin → 0.14.0-arm64-darwin

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: a41999c92fce9f7e2cdd3940863b571f679abc86744f05b88d06c270e5850a76
4
- data.tar.gz: 8db1a632a2b6a6648ba33ddedfaccab30c91c23afad744243d3ff960ecc010ac
3
+ metadata.gz: d4cb2169f4a42edc50f51b35e69cc7f127181908223fbc77760c10a0ea5fa2d2
4
+ data.tar.gz: e87e0fa20c79f7d860e317cf154c844cbda046f5c4d33d22eafe8cc04908d7ff
5
5
  SHA512:
6
- metadata.gz: 18781b62b0b311d183714296b151f314387d98c6194a8cec2312e044916e586cbe3ef82b3b31c81e7615436185022615d7890549da706530223839ede986c4da
7
- data.tar.gz: 5bd4dc7a36cf01df4179f53dc258f748b94695d77fb2ce09c877f77ad6ea7de16483f5476192a1804af076f8c0f1c80629bf1f985d810923c34b81b2061c27e2
6
+ metadata.gz: 353c3bdda57f6c4e6c9c5ef4cfcdda0bb9b6af6fcc7eda35f24ba8279cdc2e865b9fc512a75070fa459f69e2e9effcec47fcfc8576260f8532820b0c6ca559bb
7
+ data.tar.gz: e39a5cc5228f621bed10a73ce13b780092ae1967f1e3d6ae703ecaa922932597c38cc47b7a4bcde8704677e7aaaf8037c0a865b61c454a432332fcff17c3a39a
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: arm64-darwin
6
6
  authors:
7
7
  - Wilson Lin