//! CSS `transform` declarations in SVG syntax, for usvg. //! //! usvg takes the `transform` property (from a `style` attribute or a `transform: rotate(9deg)"#; let xml = roxmltree::Document::parse(svg).unwrap(); let found = rewrites(svg, &xml); let r: Vec<(&str, &str)> = found.iter().map(|(r, v)| (&svg[r.clone()], v.as_str())).collect(); assert_eq!(r, vec![(" rotate(45deg) ", " rotate(45)"), ("translate(3px,4px)", " translate(3 4)")]); } }