mirror of
https://github.com/typst/typst
synced 2025-08-26 04:34:14 +08:00
Update call site
This commit is contained in:
parent
79c1d81b10
commit
30bd04c834
@ -72,7 +72,8 @@ pub fn definition(
|
|||||||
|
|
||||||
// Try to jump to the referenced content.
|
// Try to jump to the referenced content.
|
||||||
DerefTarget::Ref(node) => {
|
DerefTarget::Ref(node) => {
|
||||||
let label = Label::new(PicoStr::intern(node.cast::<ast::Ref>()?.target()));
|
let label = Label::new(PicoStr::intern(node.cast::<ast::Ref>()?.target()))
|
||||||
|
.expect("unexpected empty label");
|
||||||
let selector = Selector::Label(label);
|
let selector = Selector::Label(label);
|
||||||
let elem = document?.introspector.query_first(&selector)?;
|
let elem = document?.introspector.query_first(&selector)?;
|
||||||
return Some(Definition::Span(elem.span()));
|
return Some(Definition::Span(elem.span()));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user