summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-11-23 10:54:25 +0100
committerLaurenz <laurmaedje@gmail.com>2022-11-23 12:00:06 +0100
commitb2a3d3f235fb5a23322435b854460f52db772114 (patch)
tree441ded5e4fcc0a702fe877fc6a3e3fedaaacabb5 /cli
parent65aa27014d090628cfef14b0679d86dd611188b9 (diff)
More general evaluation interface
Diffstat (limited to 'cli')
-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);