summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-07-25 01:16:38 +0200
committerLaurenz <laurmaedje@gmail.com>2021-07-25 01:16:38 +0200
commitec5384c97f24c3e6d8284926fd3e415f47fe2b04 (patch)
treeae95815628fd9ae9f765453a6a4b8729b26943ab /tests
parentdcfbf95220300a7866b6d03953fb4d29511cd6fa (diff)
State-based monospace handling
Diffstat (limited to 'tests')
-rw-r--r--tests/typeset.rs5
1 files changed, 1 insertions, 4 deletions
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<RefCell<Vec<Panic>>>) {
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::<Value>(ctx, "left-hand side");