Skip to main content

Crate svg_format

Crate svg_format 

Source
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§

EmbeddedContent
A request to format embedded content within an SVG document.
FormatOptions
Formatter configuration for SVG pretty-printing.

Enums§

AttributeLayout
Attribute wrapping mode.
AttributeSort
Attribute ordering mode.
BlankLines
How blank lines between sibling elements are handled.
EmbeddedLanguage
The language of embedded content found within an SVG element.
QuoteStyle
Quoting strategy for attribute values.
TextContentMode
How the formatter handles whitespace in text nodes.
WrappedAttributeIndent
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.