summaryrefslogtreecommitdiff
path: root/crates/typst-ide/src/analyze.rs
diff options
context:
space:
mode:
authorSébastien d'Herbais de Thun <sebastien.d.herbais@gmail.com>2023-11-06 21:37:50 +0100
committerGitHub <noreply@github.com>2023-11-06 21:37:50 +0100
commitc0f6d2004afebfa9412ba0c2d598ef8287197c42 (patch)
tree4bb034ca671e7d1982a306f5aecfc4f78a01841d /crates/typst-ide/src/analyze.rs
parent8fd546760c7c425398f0114997c8085a481d8d2a (diff)
Content rework 2 - Electric Boogaloo (#2504)
Diffstat (limited to 'crates/typst-ide/src/analyze.rs')
-rw-r--r--crates/typst-ide/src/analyze.rs8
1 files changed, 4 insertions, 4 deletions
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)