diff --git a/CHANGELOG.md b/CHANGELOG.md
index f762d85..1655ba4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
# minify-html changelog
+## 0.7.1
+
+- Do not remove `alt` tag when empty.
+
## 0.7.0
- Fix Node.js library not including `cli.js`.
diff --git a/gen/package.json b/gen/package.json
index 3d0a8dc..a004f9f 100644
--- a/gen/package.json
+++ b/gen/package.json
@@ -2,7 +2,7 @@
"private": true,
"dependencies": {
"@types/node": "^16.4.13",
- "@wzlin/html-data": "^2021081005.0.0",
+ "@wzlin/html-data": "^2021121401.0.0",
"ts-node": "^10.2.0",
"typescript": "^4.3.5"
}
diff --git a/rust/common/tests/mod.rs b/rust/common/tests/mod.rs
index 8440a3f..92aef82 100644
--- a/rust/common/tests/mod.rs
+++ b/rust/common/tests/mod.rs
@@ -460,9 +460,15 @@ fn test_processing_instructions() {
#[test]
fn test_js_minification() {
eval_with_js_min(b"", b"");
- eval_with_js_min(b"", b"");
+ eval_with_js_min(
+ b"",
+ b"",
+ );
// `export` statements are not allowed inline.
- eval_with_js_min(b"", b"");
+ eval_with_js_min(
+ b"",
+ b"",
+ );
eval_with_js_min(
br#"
diff --git a/rust/main/src/tests/mod.rs b/rust/main/src/tests/mod.rs
index fad97bf..642536c 100644
--- a/rust/main/src/tests/mod.rs
+++ b/rust/main/src/tests/mod.rs
@@ -122,6 +122,16 @@ fn test_attr_whatwg_unquoted_value_minification() {
);
}
+#[test]
+fn test_alt_attr_minification() {
+ eval(br#""#, br#""#);
+ eval(br#""#, br#""#);
+ eval(br#""#, br#""#);
+ eval(br#""#, br#""#);
+ eval(br#""#, br#""#);
+ eval(br#""#, br#""#);
+}
+
#[test]
fn test_viewport_attr_minification() {
eval(
@@ -132,7 +142,7 @@ fn test_viewport_attr_minification() {
eval_with_cfg(
b"",
br#""#,
- &spec_compliant_cfg
+ &spec_compliant_cfg,
);
}
diff --git a/rust/onepass/src/unit/tag.rs b/rust/onepass/src/unit/tag.rs
index b61655b..54c0406 100644
--- a/rust/onepass/src/unit/tag.rs
+++ b/rust/onepass/src/unit/tag.rs
@@ -144,7 +144,7 @@ pub fn process_tag(
.is_none();
if script_tag_type_is_js {
if &proc[value.unwrap()] != b"module" {
- erase_attr = true;
+ erase_attr = true;
};
} else {
// Tag does not contain JS, don't minify JS.