diff --git a/crates/conversion/typst2vec/src/pass/typst2vec.rs b/crates/conversion/typst2vec/src/pass/typst2vec.rs index 7d40520bc..1a5a2be90 100644 --- a/crates/conversion/typst2vec/src/pass/typst2vec.rs +++ b/crates/conversion/typst2vec/src/pass/typst2vec.rs @@ -170,6 +170,11 @@ impl Typst2VecPass { self.intern(m, &t.1); } } + VecItem::Labelled(t) => { + if !self.items.contains_key(&t.1) { + self.intern(m, &t.1); + } + } VecItem::Group(g) => { for (_, id) in g.0.iter() { if !self.items.contains_key(id) { @@ -330,6 +335,11 @@ impl Typst2VecPassImpl { ))); } + if let Some(label) = group.label.as_ref() { + let label = label.as_str().into(); + inner = self.store(VecItem::Labelled(LabelledRef(label, inner))); + } + inner } FrameItem::Text(text) => { @@ -427,6 +437,11 @@ impl Typst2VecPassImpl { } } + // pub label: Option