Skip to content

Commit b8ade4d

Browse files
committed
feat!: update minify-html from v0.15.0 to v0.16.4
1 parent 327df14 commit b8ade4d

File tree

6 files changed

+52
-46
lines changed

6 files changed

+52
-46
lines changed

Cargo.lock

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ name = "_minify_html"
1919
crate-type = ["cdylib"]
2020

2121
[dependencies]
22-
minify-html = "=0.15.0"
22+
minify-html = "=0.16.4"
2323
pyo3 = { version = "=0.24.0", features = ["extension-module"] }
2424

2525
[profile.release]

README.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,27 @@ plugins:
2323
2424
## Options
2525
26-
A description of all options is available in the [minify_html docs](https://docs.rs/minify-html/0.15.0/minify_html/struct.Cfg.html#fields).
26+
A description of all options is available in the [minify_html docs](https://docs.rs/minify-html/0.16.4/minify_html/struct.Cfg.html#fields).
2727
2828
The default plugin options are aimed at the best possible minification while maintaining compliance with the specification:
2929
3030
```yaml
3131
plugins:
3232
- search
3333
- minify_html:
34-
do_not_minify_doctype: true
35-
ensure_spec_compliant_unquoted_attribute_values: true
34+
allow_noncompliant_unquoted_attribute_values: false
35+
allow_optimal_entities: false
36+
allow_removing_spaces_between_attributes: false
3637
keep_closing_tags: false
37-
keep_html_and_head_opening_tags: false
38-
keep_spaces_between_attributes: true
3938
keep_comments: false
39+
keep_html_and_head_opening_tags: false
4040
keep_input_type_text_attr: true
4141
keep_ssi_comments: false
42-
preserve_brace_template_syntax: false
43-
preserve_chevron_percent_template_syntax: false
4442
minify_css: true
43+
minify_doctype: false
4544
minify_js: true
45+
preserve_brace_template_syntax: false
46+
preserve_chevron_percent_template_syntax: false
4647
remove_bangs: false
4748
remove_processing_instructions: false
4849
```

python/mkdocs_minify_html_plugin/_minify_html.pyi

+7-6
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@ def minify(
22
code: str,
33
/,
44
*,
5-
do_not_minify_doctype: bool,
6-
ensure_spec_compliant_unquoted_attribute_values: bool,
5+
allow_noncompliant_unquoted_attribute_values: bool,
6+
allow_optimal_entities: bool,
7+
allow_removing_spaces_between_attributes: bool,
78
keep_closing_tags: bool,
8-
keep_html_and_head_opening_tags: bool,
9-
keep_spaces_between_attributes: bool,
109
keep_comments: bool,
10+
keep_html_and_head_opening_tags: bool,
1111
keep_input_type_text_attr: bool,
1212
keep_ssi_comments: bool,
13-
preserve_brace_template_syntax: bool,
14-
preserve_chevron_percent_template_syntax: bool,
1513
minify_css: bool,
14+
minify_doctype: bool,
1615
minify_js: bool,
16+
preserve_brace_template_syntax: bool,
17+
preserve_chevron_percent_template_syntax: bool,
1718
remove_bangs: bool,
1819
remove_processing_instructions: bool,
1920
) -> str: ...

python/mkdocs_minify_html_plugin/plugin.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,19 @@
1818

1919

2020
class MinifyHtmlConfig(Config):
21-
do_not_minify_doctype = c.Type(bool, default=True)
22-
ensure_spec_compliant_unquoted_attribute_values = c.Type(bool, default=True)
21+
allow_noncompliant_unquoted_attribute_values = c.Type(bool, default=False)
22+
allow_optimal_entities = c.Type(bool, default=False)
23+
allow_removing_spaces_between_attributes = c.Type(bool, default=False)
2324
keep_closing_tags = c.Type(bool, default=False)
24-
keep_html_and_head_opening_tags = c.Type(bool, default=False)
25-
keep_spaces_between_attributes = c.Type(bool, default=True)
2625
keep_comments = c.Type(bool, default=False)
26+
keep_html_and_head_opening_tags = c.Type(bool, default=False)
2727
keep_input_type_text_attr = c.Type(bool, default=True)
2828
keep_ssi_comments = c.Type(bool, default=False)
29-
preserve_brace_template_syntax = c.Type(bool, default=False)
30-
preserve_chevron_percent_template_syntax = c.Type(bool, default=False)
3129
minify_css = c.Type(bool, default=True)
30+
minify_doctype = c.Type(bool, default=False)
3231
minify_js = c.Type(bool, default=True)
32+
preserve_brace_template_syntax = c.Type(bool, default=False)
33+
preserve_chevron_percent_template_syntax = c.Type(bool, default=False)
3334
remove_bangs = c.Type(bool, default=False)
3435
remove_processing_instructions = c.Type(bool, default=False)
3536

src/lib.rs

+21-18
Original file line numberDiff line numberDiff line change
@@ -7,53 +7,56 @@ use pyo3::prelude::*;
77
code,
88
/,
99
*,
10-
do_not_minify_doctype,
11-
ensure_spec_compliant_unquoted_attribute_values,
10+
allow_noncompliant_unquoted_attribute_values,
11+
allow_optimal_entities,
12+
allow_removing_spaces_between_attributes,
1213
keep_closing_tags,
13-
keep_html_and_head_opening_tags,
14-
keep_spaces_between_attributes,
1514
keep_comments,
15+
keep_html_and_head_opening_tags,
1616
keep_input_type_text_attr,
1717
keep_ssi_comments,
18-
preserve_brace_template_syntax,
19-
preserve_chevron_percent_template_syntax,
2018
minify_css,
19+
minify_doctype,
2120
minify_js,
21+
preserve_brace_template_syntax,
22+
preserve_chevron_percent_template_syntax,
2223
remove_bangs,
2324
remove_processing_instructions,
2425
))]
2526
fn minify(
2627
py: Python<'_>,
2728
code: &str,
28-
do_not_minify_doctype: bool,
29-
ensure_spec_compliant_unquoted_attribute_values: bool,
29+
allow_noncompliant_unquoted_attribute_values: bool,
30+
allow_optimal_entities: bool,
31+
allow_removing_spaces_between_attributes: bool,
3032
keep_closing_tags: bool,
31-
keep_html_and_head_opening_tags: bool,
32-
keep_spaces_between_attributes: bool,
3333
keep_comments: bool,
34+
keep_html_and_head_opening_tags: bool,
3435
keep_input_type_text_attr: bool,
3536
keep_ssi_comments: bool,
36-
preserve_brace_template_syntax: bool,
37-
preserve_chevron_percent_template_syntax: bool,
3837
minify_css: bool,
38+
minify_doctype: bool,
3939
minify_js: bool,
40+
preserve_brace_template_syntax: bool,
41+
preserve_chevron_percent_template_syntax: bool,
4042
remove_bangs: bool,
4143
remove_processing_instructions: bool,
4244
) -> String {
4345
py.allow_threads(move || {
4446
let cfg = ::minify_html::Cfg {
45-
do_not_minify_doctype,
46-
ensure_spec_compliant_unquoted_attribute_values,
47+
allow_noncompliant_unquoted_attribute_values,
48+
allow_optimal_entities,
49+
allow_removing_spaces_between_attributes,
4750
keep_closing_tags,
48-
keep_html_and_head_opening_tags,
49-
keep_spaces_between_attributes,
5051
keep_comments,
52+
keep_html_and_head_opening_tags,
5153
keep_input_type_text_attr,
5254
keep_ssi_comments,
53-
preserve_brace_template_syntax,
54-
preserve_chevron_percent_template_syntax,
5555
minify_css,
56+
minify_doctype,
5657
minify_js,
58+
preserve_brace_template_syntax,
59+
preserve_chevron_percent_template_syntax,
5760
remove_bangs,
5861
remove_processing_instructions,
5962
};

0 commit comments

Comments
 (0)