diff options
| author | Laurenz <laurmaedje@gmail.com> | 2025-02-03 17:04:54 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-03 16:04:54 +0000 |
| commit | eee903b0f8d5c0dfda3539888d7473c6163841b0 (patch) | |
| tree | d92b2f4565b0153c03cbb63575e2edd4e911e853 /docs/src/link.rs | |
| parent | 12dbb012b19a29612fc863c558901200b4013f5d (diff) | |
Refactor `Scope` (#5797)
Diffstat (limited to 'docs/src/link.rs')
| -rw-r--r-- | docs/src/link.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/src/link.rs b/docs/src/link.rs index 375cc8c2..c7222b8e 100644 --- a/docs/src/link.rs +++ b/docs/src/link.rs @@ -1,5 +1,5 @@ use typst::diag::{bail, StrResult}; -use typst::foundations::Func; +use typst::foundations::{Binding, Func}; use crate::{get_module, GROUPS, LIBRARY}; @@ -59,7 +59,7 @@ fn resolve_definition(head: &str, base: &str) -> StrResult<String> { while let Some(name) = parts.peek() { if category.is_none() { - category = focus.scope().get_category(name); + category = focus.scope().get(name).and_then(Binding::category); } let Ok(module) = get_module(focus, name) else { break }; focus = module; |
