summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalo <57839069+MDLC01@users.noreply.github.com>2023-12-18 17:01:55 +0100
committerGitHub <noreply@github.com>2023-12-18 17:01:55 +0100
commite8e797c18b43559d3dad23452dc48b60d8097729 (patch)
treedb56bbbb634bcd0f96ec833d6aa373b08c183a5f
parenta821b48cf4fc155aba62ef516be4881af957b8a7 (diff)
Explain how to get the location of an element returned by `query` (#2999)
-rw-r--r--crates/typst/src/introspection/query.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/typst/src/introspection/query.rs b/crates/typst/src/introspection/query.rs
index 76c9216f..7b7d581c 100644
--- a/crates/typst/src/introspection/query.rs
+++ b/crates/typst/src/introspection/query.rs
@@ -9,6 +9,9 @@ use crate::introspection::Location;
/// retrieve the current document location with the [`locate`]($locate)
/// function.
///
+/// You can get the location of the elements returned by `query` with
+/// [`location`]($content.location).
+///
/// # Finding elements
/// In the example below, we create a custom page header that displays the text
/// "Typst Academy" in small capitals and the current section title. On the