diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-05-25 14:13:01 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-05-25 14:56:37 +0200 |
| commit | 30fdba4356683198a298eebb44e28cb8c191a0e1 (patch) | |
| tree | 3c702ca8ecd3240b25bb3bee9cc26e3b608baef0 /src/main.rs | |
| parent | c010cbc17dcbb2f0d6005d21530143bf57cb5871 (diff) | |
Move deps from context to VM
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs index 821f1008..33302eee 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,13 +11,11 @@ use same_file::is_same_file; use termcolor::{ColorChoice, StandardStream, WriteColor}; use typst::diag::{Error, StrResult}; -use typst::export; use typst::font::{FaceInfo, FontStore}; use typst::library::text::THEME; use typst::loading::FsLoader; use typst::parse::TokenMode; use typst::source::SourceStore; -use typst::syntax; use typst::{Config, Context}; /// What to do. @@ -217,7 +215,7 @@ fn typeset(command: TypesetCommand) -> StrResult<()> { match typst::typeset(&mut ctx, id) { // Export the PDF. Ok(frames) => { - let buffer = export::pdf(&ctx, &frames); + let buffer = typst::export::pdf(&ctx, &frames); fs::write(&command.output, buffer).map_err(|_| "failed to write PDF file")?; } @@ -266,7 +264,7 @@ fn highlight(command: HighlightCommand) -> StrResult<()> { let input = std::fs::read_to_string(&command.input) .map_err(|_| "failed to load source file")?; - let html = syntax::highlight_html(&input, TokenMode::Markup, &THEME); + let html = typst::syntax::highlight_html(&input, TokenMode::Markup, &THEME); fs::write(&command.output, html).map_err(|_| "failed to write HTML file")?; Ok(()) |
