mirror of
https://github.com/typst/typst
synced 2025-05-16 01:55:28 +08:00
Update query's documentation (#1026)
This commit is contained in:
parent
cfad59967c
commit
b5d72caaf9
@ -89,6 +89,13 @@ use crate::prelude::*;
|
|||||||
/// })
|
/// })
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
|
/// ## Migration Hints
|
||||||
|
/// The `before` and `after` arguments have been removed in version 0.3.0. You
|
||||||
|
/// can now use flexible selector combinator methods instead. For example,
|
||||||
|
/// `query(heading, before: loc)` becomes `query(heading.before(loc), loc)`.
|
||||||
|
/// Please refer to the [selector documentation]($type/selector) for more
|
||||||
|
/// details.
|
||||||
|
///
|
||||||
/// Display: Query
|
/// Display: Query
|
||||||
/// Category: meta
|
/// Category: meta
|
||||||
/// Returns: content
|
/// Returns: content
|
||||||
@ -112,8 +119,6 @@ pub fn query(
|
|||||||
/// the query's result is reduced. If you could call it directly at the top
|
/// the query's result is reduced. If you could call it directly at the top
|
||||||
/// level of a module, the evaluation of the whole module and its exports
|
/// level of a module, the evaluation of the whole module and its exports
|
||||||
/// could depend on the query's result.
|
/// could depend on the query's result.
|
||||||
///
|
|
||||||
/// Only one of this, `before`, and `after` shall be given.
|
|
||||||
location: Location,
|
location: Location,
|
||||||
) -> Value {
|
) -> Value {
|
||||||
let _ = location;
|
let _ = location;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user