Expand description
Deterministic structural formatting for SVG documents.
§Examples
let input = r#"<svg><rect x="0" y="0" /></svg>"#;
let formatted = svg_format::format(input);
assert!(formatted.contains("<rect"));Structs§
- Embedded
Content - A request to format embedded content within an SVG document.
- Format
Options - Formatter configuration for SVG pretty-printing.
Enums§
- Attribute
Layout - Attribute wrapping mode.
- Attribute
Sort - Attribute ordering mode.
- Blank
Lines - How blank lines between sibling elements are handled.
- Embedded
Language - The language of embedded content found within an SVG element.
- Quote
Style - Quoting strategy for attribute values.
- Text
Content Mode - How the formatter handles whitespace in text nodes.
- Wrapped
Attribute Indent - Indentation strategy for wrapped attributes.
Functions§
- format
- Format an SVG source string with default options.
- format_
with_ host - Format an SVG source string, delegating embedded content to a callback.
- format_
with_ options - Format an SVG source string with explicit options.