From ad75f3c91dcf99f8a8ede5d33a3e07ea3b173f4a Mon Sep 17 00:00:00 2001 From: Wilson Lin Date: Sat, 4 Dec 2021 15:51:30 +1100 Subject: [PATCH] Improve README --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d90f16d..e31cb2f 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Comparison with [html-minfier](https://github.com/kangax/html-minifier) and [min 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. -## Usage +## Compatibility and usage
CLI @@ -144,6 +144,8 @@ Configuration cfg = new Configuration.Builder() String minified = MinifyHtml.minify("

Hello, world!

", cfg); ``` +All [`Cfg` fields](https://docs.rs/minify-html/latest/minify_html/struct.Cfg.html) are available as camelCase setter methods on the `Builder`; if any are not set, they default to `false`. +
@@ -165,6 +167,8 @@ import minify_html minified = minify_html.minify("

Hello, world!

", minify_js=True, remove_processing_instructions=True) ``` +All [`Cfg` fields](https://docs.rs/minify-html/latest/minify_html/struct.Cfg.html) are available as Python keyword arguments; if any are omitted, they default to `False`. +
@@ -186,6 +190,8 @@ require 'minify_html' print MinifyHtml.minify("

Hello, world!

", { :keep_spaces_between_attributes => true, :minify_js => true }) ``` +All [`Cfg` fields](https://docs.rs/minify-html/latest/minify_html/struct.Cfg.html) are available; if any are omitted, they default to `false`. +
## Minification