From c0f6d2004afebfa9412ba0c2d598ef8287197c42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20d=27Herbais=20de=20Thun?= Date: Mon, 6 Nov 2023 21:37:50 +0100 Subject: Content rework 2 - Electric Boogaloo (#2504) --- crates/typst-ide/src/analyze.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/typst-ide/src/analyze.rs') diff --git a/crates/typst-ide/src/analyze.rs b/crates/typst-ide/src/analyze.rs index 32f3df0d..4d12e1c5 100644 --- a/crates/typst-ide/src/analyze.rs +++ b/crates/typst-ide/src/analyze.rs @@ -85,10 +85,10 @@ pub fn analyze_labels( // Labels in the document. for elem in introspector.all() { - let Some(label) = elem.label().cloned() else { continue }; + let Some(label) = elem.label() else { continue }; let details = elem - .field("caption") - .or_else(|| elem.field("body")) + .get_by_name("caption") + .or_else(|| elem.get_by_name("body")) .and_then(|field| match field { Value::Content(content) => Some(content), _ => None, @@ -103,7 +103,7 @@ pub fn analyze_labels( // Bibliography keys. for (key, detail) in (items.bibliography_keys)(introspector.track()) { - output.push((Label(key), detail)); + output.push((Label::new(&key), detail)); } (output, split) -- cgit v1.2.3