summaryrefslogtreecommitdiff
path: root/cli/src
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src')
-rw-r--r--cli/src/main.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/cli/src/main.rs b/cli/src/main.rs
index 8030a82d..f7fd5903 100644
--- a/cli/src/main.rs
+++ b/cli/src/main.rs
@@ -235,10 +235,12 @@ fn typeset(command: TypesetCommand) -> StrResult<()> {
/// Typeset a single time.
fn typeset_once(world: &mut SystemWorld, command: &TypesetCommand) -> StrResult<()> {
status(command, Status::Compiling).unwrap();
-
world.reset();
+
let main = world.resolve(&command.input).map_err(|err| err.to_string())?;
- match typst::typeset(world, main) {
+ let source = world.source(main);
+
+ match typst::typeset(world, source) {
// Export the PDF.
Ok(frames) => {
let buffer = typst::export::pdf(&frames);