pub struct Cfg {Show 15 fields
pub allow_noncompliant_unquoted_attribute_values: bool,
pub allow_optimal_entities: bool,
pub allow_removing_spaces_between_attributes: bool,
pub keep_closing_tags: bool,
pub keep_comments: bool,
pub keep_html_and_head_opening_tags: bool,
pub keep_input_type_text_attr: bool,
pub keep_ssi_comments: bool,
pub minify_css: bool,
pub minify_doctype: bool,
pub minify_js: bool,
pub preserve_brace_template_syntax: bool,
pub preserve_chevron_percent_template_syntax: bool,
pub remove_bangs: bool,
pub remove_processing_instructions: bool,
}
Expand description
Configuration settings that can be adjusted and passed to a minification function to change the minification approach.
Allow unquoted attribute values in the output to contain characters prohibited by the WHATWG specification. These will still be parsed correctly by almost all browsers.
Allow some minifications around entities that may not pass validation, but will still be parsed correctly by almost all browsers.
Allow removing_spaces between attributes when possible, which may not be spec compliant. These will still be parsed correctly by almost all browsers.
Do not omit closing tags when possible.
Keep all comments.
§keep_html_and_head_opening_tags: bool
Do not omit <html>
and <head>
opening tags when they don’t have attributes.
Keep type=text
attribute name and value on <input>
elements.
Keep SSI comments.
Minify CSS in <style>
tags and style
attributes using https://github.com/parcel-bundler/lightningcss.
Minify DOCTYPEs. Minified DOCTYPEs may not be spec compliant, but will still be parsed correctly by almost all browsers.
Minify JavaScript in <script>
tags using minify-js.
When {{
, {#
, or {%
are seen in content, all source code until the subsequent matching closing }}
, #}
, or %}
respectively gets piped through untouched.
When <%
is seen in content, all source code until the subsequent matching closing %>
gets piped through untouched.
Remove all bangs.
Remove all processing instructions.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4