mirror of
https://github.com/typst/typst
synced 2025-05-13 12:36:23 +08:00
Scale fake function call
This commit is contained in:
parent
afa344f33d
commit
451ba699cb
@ -962,15 +962,21 @@ impl Eval for ast::FuncCall {
|
|||||||
return Ok(Value::Content((vm.items.math_accent)(base, accent)));
|
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() {
|
for (i, arg) in args.all::<Content>()?.into_iter().enumerate() {
|
||||||
if i > 0 {
|
if i > 0 {
|
||||||
body += (vm.items.text)(','.into());
|
body += (vm.items.text)(','.into());
|
||||||
}
|
}
|
||||||
body += arg;
|
body += arg;
|
||||||
}
|
}
|
||||||
body += (vm.items.text)(')'.into());
|
return Ok(Value::Content(
|
||||||
return Ok(Value::Content(callee.display() + body));
|
callee.display()
|
||||||
|
+ (vm.items.math_delimited)(
|
||||||
|
(vm.items.text)('('.into()),
|
||||||
|
body,
|
||||||
|
(vm.items.text)(')'.into()),
|
||||||
|
),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finally, just a normal function call!
|
// Finally, just a normal function call!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user