Compare commits

...

3 Commits

Author SHA1 Message Date
Andrew Voynov
e0074dfc01 Make array.chunks example more readable (#5975) 2025-03-06 16:30:59 +01:00
F2011
d97967dd40 Correct typo (#5971) 2025-03-06 16:30:59 +01:00
Tijme
9c41234574 Fix docs example with type/string comparison (#5987) 2025-03-06 16:30:59 +01:00
3 changed files with 5 additions and 5 deletions

View File

@ -769,7 +769,7 @@ impl Array {
/// ///
/// ```example /// ```example
/// #let array = (1, 2, 3, 4, 5, 6, 7, 8) /// #let array = (1, 2, 3, 4, 5, 6, 7, 8)
/// #array.chunks(3) /// #array.chunks(3) \
/// #array.chunks(3, exact: true) /// #array.chunks(3, exact: true)
/// ``` /// ```
#[func] #[func]

View File

@ -34,14 +34,14 @@ use crate::loading::{DataSource, Load, Readable};
/// let author = find-child(elem, "author") /// let author = find-child(elem, "author")
/// let pars = find-child(elem, "content") /// let pars = find-child(elem, "content")
/// ///
/// heading(title.children.first()) /// [= #title.children.first()]
/// text(10pt, weight: "medium")[ /// text(10pt, weight: "medium")[
/// Published by /// Published by
/// #author.children.first() /// #author.children.first()
/// ] /// ]
/// ///
/// for p in pars.children { /// for p in pars.children {
/// if (type(p) == "dictionary") { /// if type(p) == dictionary {
/// parbreak() /// parbreak()
/// p.children.first() /// p.children.first()
/// } /// }
@ -50,7 +50,7 @@ use crate::loading::{DataSource, Load, Readable};
/// ///
/// #let data = xml("example.xml") /// #let data = xml("example.xml")
/// #for elem in data.first().children { /// #for elem in data.first().children {
/// if (type(elem) == "dictionary") { /// if type(elem) == dictionary {
/// article(elem) /// article(elem)
/// } /// }
/// } /// }

View File

@ -447,7 +447,7 @@ document.
To let a function style your whole document, the show rule processes everything To let a function style your whole document, the show rule processes everything
that comes after it and calls the function specified after the colon with the that comes after it and calls the function specified after the colon with the
result as an argument. The `.with` part is a _method_ that takes the `conf` result as an argument. The `.with` part is a _method_ that takes the `conf`
function and pre-configures some if its arguments before passing it on to the function and pre-configures some of its arguments before passing it on to the
show rule. show rule.
</div> </div>