From 80b4ca4c04cb5d911947895d9d04c87efb97b0f4 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 8 Nov 2023 13:21:25 +0100 Subject: Extract `typst-svg` crate --- crates/typst-cli/Cargo.toml | 1 + crates/typst-cli/src/compile.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/typst-cli') diff --git a/crates/typst-cli/Cargo.toml b/crates/typst-cli/Cargo.toml index 9a96c6b2..6e270bd8 100644 --- a/crates/typst-cli/Cargo.toml +++ b/crates/typst-cli/Cargo.toml @@ -23,6 +23,7 @@ doc = false typst = { workspace = true } typst-library = { workspace = true } typst-render = { workspace = true } +typst-svg = { workspace = true } chrono = { workspace = true } clap = { workspace = true } codespan-reporting = { workspace = true } diff --git a/crates/typst-cli/src/compile.rs b/crates/typst-cli/src/compile.rs index 80e19f1b..9eec36cb 100644 --- a/crates/typst-cli/src/compile.rs +++ b/crates/typst-cli/src/compile.rs @@ -226,7 +226,7 @@ fn export_image( .map_err(|err| eco_format!("failed to write PNG file ({err})"))?; } ImageExportFormat::Svg => { - let svg = typst::export::svg(frame); + let svg = typst_svg::svg(frame); fs::write(path, svg.as_bytes()) .map_err(|err| eco_format!("failed to write SVG file ({err})"))?; } -- cgit v1.2.3