Skip to main content

pretty_print_html

Function pretty_print_html 

Source
pub fn pretty_print_html(html: &str) -> String
Expand description

Pretty-print HTML with indentation.

Adds newlines and indentation to make HTML human-readable. Void elements (br, hr, img, input, meta, link) are not indented as blocks.

§Arguments

  • html - The HTML content to format

§Returns

The pretty-printed HTML content