diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-03-17 16:27:40 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-03-17 18:18:47 +0100 |
| commit | af7fe4d76083c597ec2198a73383b9e3899d75ea (patch) | |
| tree | cb3b9766ee15dbfbecf7f9b9a2257859d7a7b3c7 /library/src/layout/page.rs | |
| parent | 6d64d3e8e9123f3fa8166c8b710e2b2c61ed5898 (diff) | |
Hover and autocomplete in show rules
Diffstat (limited to 'library/src/layout/page.rs')
| -rw-r--r-- | library/src/layout/page.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/library/src/layout/page.rs b/library/src/layout/page.rs index 962e8a16..eeb74a55 100644 --- a/library/src/layout/page.rs +++ b/library/src/layout/page.rs @@ -403,13 +403,10 @@ pub enum Marginal { impl Marginal { /// Resolve the marginal based on the page number. - pub fn resolve(&self, vt: &Vt, page: usize) -> SourceResult<Content> { + pub fn resolve(&self, vt: &mut Vt, page: usize) -> SourceResult<Content> { Ok(match self { Self::Content(content) => content.clone(), - Self::Func(func) => { - let args = Args::new(func.span(), [Value::Int(page as i64)]); - func.call_detached(vt.world, args)?.display() - } + Self::Func(func) => func.call_vt(vt, [Value::Int(page as i64)])?.display(), }) } } |
