Update remaining examples

This commit is contained in:
Martin Haug 2023-01-29 23:26:31 +01:00
parent c987f07b76
commit c3b3bbb9f2
4 changed files with 8 additions and 8 deletions

View File

@ -111,7 +111,7 @@ fn minmax(args: &mut Args, goal: Ordering) -> SourceResult<Value> {
/// ```
/// #even(4) \
/// #even(5) \
/// { range(10).filter(even) }
/// #range(10).filter(even)
/// ```
///
/// ## Parameters
@ -134,7 +134,7 @@ pub fn even(args: &mut Args) -> SourceResult<Value> {
/// ```
/// #odd(4) \
/// #odd(5) \
/// { range(10).filter(odd) }
/// #range(10).filter(odd)
/// ```
///
///

View File

@ -16,7 +16,7 @@ use crate::prelude::*;
/// #int(false) \
/// #int(true) \
/// #int(2.7) \
/// { int("27") + int("4") }
/// #{ int("27") + int("4") }
/// ```
///
/// ## Parameters
@ -331,7 +331,7 @@ pub fn label(args: &mut Args) -> SourceResult<Value> {
/// The numbers 1 to 10.
///
/// // Works with string methods.
/// { "a,b;c"
/// #{ "a,b;c"
/// .split(regex("[,;]")) }
/// ```
///

View File

@ -166,7 +166,7 @@ fn format_csv_error(error: csv::Error) -> String {
/// )
/// #h(6pt)
/// #set text(22pt, baseline: -8pt)
/// {day.temperature} °{day.unit}
/// #{day.temperature} °#{day.unit}
/// ]
///
/// #forecast(json("monday.json"))
@ -253,7 +253,7 @@ fn format_json_error(error: serde_json::Error) -> String {
/// heading(title.children.first())
/// text(10pt, weight: "medium")[
/// Published by
/// {author.children.first()}
/// #{author.children.first()}
/// ]
///
/// for p in pars.children {

View File

@ -110,13 +110,13 @@ impl Inline for BoxNode {}
///
/// ## Example
/// ```
/// [
/// #[
/// #show heading: it => it.title
/// = No block
/// Some text
/// ]
///
/// [
/// #[
/// #show heading: it => block(it.title)
/// = Block
/// Some more text