minify_html 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -32
- data/lib/linux-ruby2.5 +0 -0
- data/lib/linux-ruby2.6 +0 -0
- data/lib/linux-ruby2.7 +0 -0
- data/lib/macos-ruby2.5 +0 -0
- data/lib/macos-ruby2.6 +0 -0
- data/lib/macos-ruby2.7 +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48311a521c9d5d989ef54034192b7211c85aa28a5e879b72f565ad4e7e42828d
|
4
|
+
data.tar.gz: c5e729f7a2976722fb346e427203d0889f73dadbbf5829042bca6d4f8c1044d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e22e109f8faf9d0640b5254692bd81b224456620227a828e2720edb71be01aaea680bccf3e99f8957eee51d93e9d75d284a6996731c2639c6cb0371379491f2a
|
7
|
+
data.tar.gz: f4ccccacdc392d990451a9f110911856e2893e757d36318a6c52353f7c518580859f50a679181790dfb8c43b85acae6a18c3fd3053b684d4dda00456d21a4c58
|
data/README.md
CHANGED
@@ -11,7 +11,7 @@ An HTML minifier meticulously optimised for both speed and effectiveness, availa
|
|
11
11
|
|
12
12
|
Comparison with [html-minfier](https://github.com/kangax/html-minifier) and [minimize](https://github.com/Swaagie/minimize), run on the top web pages. [See the breakdown here.](./bench)
|
13
13
|
|
14
|
-
<img width="415" alt="Chart showing speed of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.3.
|
14
|
+
<img width="415" alt="Chart showing speed of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.3.5/js/average-speeds.png"> <img width="415" alt="Chart showing effectiveness of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.3.5/js/average-sizes.png">
|
15
15
|
|
16
16
|
## Usage
|
17
17
|
|
@@ -21,9 +21,9 @@ Precompiled binaries are available for x86-64 Linux, macOS, and Windows.
|
|
21
21
|
|
22
22
|
##### Get
|
23
23
|
|
24
|
-
[Linux](https://wilsonl.in/minify-html/bin/0.3.
|
25
|
-
[macOS](https://wilsonl.in/minify-html/bin/0.3.
|
26
|
-
[Windows](https://wilsonl.in/minify-html/bin/0.3.
|
24
|
+
[Linux](https://wilsonl.in/minify-html/bin/0.3.5-linux-x86_64) |
|
25
|
+
[macOS](https://wilsonl.in/minify-html/bin/0.3.5-macos-x86_64) |
|
26
|
+
[Windows](https://wilsonl.in/minify-html/bin/0.3.5-windows-x86_64.exe)
|
27
27
|
|
28
28
|
##### Use
|
29
29
|
|
@@ -42,7 +42,7 @@ minify-html --src /path/to/src.html --out /path/to/output.min.html
|
|
42
42
|
|
43
43
|
```toml
|
44
44
|
[dependencies]
|
45
|
-
minify-html = { version = "0.3.
|
45
|
+
minify-html = { version = "0.3.5", features = ["js-esbuild"] }
|
46
46
|
```
|
47
47
|
|
48
48
|
Building with the `js-esbuild` feature requires the Go compiler to be installed as well, to build the [JS minifier](https://github.com/evanw/esbuild).
|
@@ -161,7 +161,7 @@ Add as a Maven dependency:
|
|
161
161
|
<dependency>
|
162
162
|
<groupId>in.wilsonl.minifyhtml</groupId>
|
163
163
|
<artifactId>minify-html</artifactId>
|
164
|
-
<version>0.3.
|
164
|
+
<version>0.3.5</version>
|
165
165
|
</dependency>
|
166
166
|
```
|
167
167
|
|
@@ -448,8 +448,7 @@ Spaces are removed between attributes if possible.
|
|
448
448
|
|
449
449
|
### Entities
|
450
450
|
|
451
|
-
Entities are decoded if valid
|
452
|
-
Some entities are longer decoded than encoded, so they're left encoded.
|
451
|
+
Entities are decoded if they're valid and shorter or equal in length when decoded.
|
453
452
|
|
454
453
|
Numeric entities that do not refer to a valid [Unicode Scalar Value](https://www.unicode.org/glossary/#unicode_scalar_value) are replaced with the [replacement character](https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character).
|
455
454
|
|
@@ -479,33 +478,10 @@ However, there are some syntax requirements for speed and sanity.
|
|
479
478
|
|
480
479
|
### Tags
|
481
480
|
|
482
|
-
|
483
|
-
|
484
|
-
Tags must not be [omitted](https://html.spec.whatwg.org/multipage/syntax.html#syntax-tag-omission). Void tags must not have a separate closing tag e.g. `</input>`.
|
485
|
-
|
486
|
-
### Entities
|
487
|
-
|
488
|
-
Well-formed entities are decoded, including in attribute values.
|
489
|
-
|
490
|
-
They are interpreted as characters representing their decoded value. This means that `	` is considered a whitespace character and could be minified.
|
491
|
-
|
492
|
-
Malformed entities are interpreted literally as a sequence of characters.
|
493
|
-
|
494
|
-
If a named entity is an invalid reference as per the [specification](https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references), it is considered malformed.
|
495
|
-
|
496
|
-
Numeric character references that do not reference a valid [Unicode Scalar Value](https://www.unicode.org/glossary/#unicode_scalar_value) are considered malformed.
|
497
|
-
|
498
|
-
### Attributes
|
499
|
-
|
500
|
-
Backticks (`` ` ``) are not valid quote marks and not interpreted as such.
|
501
|
-
However, backticks are valid attribute value quotes in Internet Explorer.
|
502
|
-
|
503
|
-
Special handling of some attributes require case sensitive names and values. For example, `CLASS` won't be recognised as an attribute to minify, and `type="Text/JavaScript"` on a `<script>` will not be removed.
|
481
|
+
Opening tags must not be [omitted](https://html.spec.whatwg.org/multipage/syntax.html#syntax-tag-omission).
|
504
482
|
|
505
483
|
### Script and style
|
506
484
|
|
507
|
-
`script` and `style` tags must be closed with `</script>` and `</style>` respectively (case sensitive).
|
508
|
-
|
509
485
|
minify-html does **not** handle [escaped and double-escaped](./notes/Script%20data.md) script content.
|
510
486
|
|
511
487
|
## Issues and contributions
|
data/lib/linux-ruby2.5
CHANGED
Binary file
|
data/lib/linux-ruby2.6
CHANGED
Binary file
|
data/lib/linux-ruby2.7
CHANGED
Binary file
|
data/lib/macos-ruby2.5
CHANGED
Binary file
|
data/lib/macos-ruby2.6
CHANGED
Binary file
|
data/lib/macos-ruby2.7
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minify_html
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wilson Lin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fiddle
|