pub struct Stringify {Show 18 fields
pub allow_dangerous_html: bool,
pub allow_dangerous_characters: bool,
pub allow_parse_errors: bool,
pub bogus_comments: bool,
pub close_empty_elements: bool,
pub close_self_closing: bool,
pub collapse_empty_attributes: bool,
pub omit_optional_tags: bool,
pub prefer_unquoted: bool,
pub quote: Option<String>,
pub quote_smart: bool,
pub space: Option<String>,
pub tight_attributes: bool,
pub tight_comma_separated_lists: bool,
pub tight_doctype: bool,
pub tight_self_closing: bool,
pub upper_doctype: bool,
pub voids: Option<Vec<String>>,
}Expand description
html.stringify: hast into HTML; options named as hast-util-to-html names them.
Fields§
§allow_dangerous_html: boolWrite raw nodes as they are instead of escaping them.
allow_dangerous_characters: boolLeave characters that are only dangerous in some contexts, such as `, as they are.
allow_parse_errors: boolLeave characters as they are where browsers accept them though the spec does not.
bogus_comments: boolWrite comments as bogus comments, <?a>.
close_empty_elements: boolClose empty foreign elements, <a />.
close_self_closing: boolClose void elements, <br />.
collapse_empty_attributes: boolWrite empty attributes as bare names, a rather than a="".
Leave out tags the HTML spec lets a parser imply.
prefer_unquoted: boolLeave attribute values unquoted where that is safe.
quote: Option<String>The quote attribute values are wrapped in: " or '.
quote_smart: boolUse the other quote when the value holds more of the preferred one.
space: Option<String>The space the tree is in: html or svg.
tight_attributes: boolLeave out the space between quoted attributes.
tight_comma_separated_lists: boolJoin comma-separated values with , rather than , .
tight_doctype: boolWrite <!doctypehtml>.
tight_self_closing: boolLeave out the space before /> when the attributes allow.
upper_doctype: boolWrite <!DOCTYPE html>.
voids: Option<Vec<String>>The tag names of void elements, which have no closing tag.