summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-02-01 13:32:14 +0100
committerLaurenz <laurmaedje@gmail.com>2023-02-01 13:32:14 +0100
commit451ba699cbc69b683c5cb3f99e5ba48c591717c8 (patch)
treef52c8b6abef6c21d76fd69f276cf719cd04d1b4b
parentafa344f33db80456bb3091e3863ca673d43c5db8 (diff)
Scale fake function call
-rw-r--r--src/model/eval.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/model/eval.rs b/src/model/eval.rs
index 96e7317d..6e03d440 100644
--- a/src/model/eval.rs
+++ b/src/model/eval.rs
@@ -962,15 +962,21 @@ impl Eval for ast::FuncCall {
return Ok(Value::Content((vm.items.math_accent)(base, accent)));
}
}
- let mut body = (vm.items.text)('('.into());
+ let mut body = Content::empty();
for (i, arg) in args.all::<Content>()?.into_iter().enumerate() {
if i > 0 {
body += (vm.items.text)(','.into());
}
body += arg;
}
- body += (vm.items.text)(')'.into());
- return Ok(Value::Content(callee.display() + body));
+ return Ok(Value::Content(
+ callee.display()
+ + (vm.items.math_delimited)(
+ (vm.items.text)('('.into()),
+ body,
+ (vm.items.text)(')'.into()),
+ ),
+ ));
}
// Finally, just a normal function call!