From ec5384c97f24c3e6d8284926fd3e415f47fe2b04 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sun, 25 Jul 2021 01:16:38 +0200 Subject: State-based monospace handling --- tests/typeset.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/typeset.rs b/tests/typeset.rs index 08d812fb..6b2258bf 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -143,10 +143,7 @@ fn register_helpers(scope: &mut Scope, panics: Rc>>) { scope.def_func("args", |_, args| { let repr = typst::pretty::pretty(args); args.items.clear(); - Value::template(move |ctx| { - ctx.set_monospace(); - ctx.push_text(&repr); - }) + Value::template(move |ctx| ctx.push_monospace_text(&repr)) }); scope.def_func("test", move |ctx, args| { let lhs = args.expect::(ctx, "left-hand side"); -- cgit v1.2.3