From 95b2e81cb36f7cf70446979c3ff799af2a69f545 Mon Sep 17 00:00:00 2001 From: 0xpapercut <0xpapercut@gmail.com> Date: Sun, 3 Mar 2024 05:00:02 +0100 Subject: [PATCH] Update ContentConverter fields --- src/core/src/converter.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/src/converter.rs b/src/core/src/converter.rs index 4f87c3e..2646152 100644 --- a/src/core/src/converter.rs +++ b/src/core/src/converter.rs @@ -14,6 +14,8 @@ pub fn convert(root: &Content) -> Node { let styles = typst::foundations::StyleChain::default(); let mut converter = ContentConverter { styles: styles, + parent: None, + position: None }; root.accept(&mut converter) } @@ -21,6 +23,8 @@ pub fn convert(root: &Content) -> Node { #[derive(Clone)] pub struct ContentConverter<'a> { pub styles: typst::foundations::StyleChain<'a>, + pub parent: Option, + pub position: Option, } impl ContentVisitor for ContentConverter<'_> {