From c3b3bbb9f23604e9003c300cca6f6c7babe944fc Mon Sep 17 00:00:00 2001 From: Martin Haug Date: Sun, 29 Jan 2023 23:26:31 +0100 Subject: [PATCH] Update remaining examples --- library/src/compute/calc.rs | 4 ++-- library/src/compute/construct.rs | 4 ++-- library/src/compute/data.rs | 4 ++-- library/src/layout/container.rs | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/library/src/compute/calc.rs b/library/src/compute/calc.rs index 830f50338..640ec3c53 100644 --- a/library/src/compute/calc.rs +++ b/library/src/compute/calc.rs @@ -111,7 +111,7 @@ fn minmax(args: &mut Args, goal: Ordering) -> SourceResult { /// ``` /// #even(4) \ /// #even(5) \ -/// { range(10).filter(even) } +/// #range(10).filter(even) /// ``` /// /// ## Parameters @@ -134,7 +134,7 @@ pub fn even(args: &mut Args) -> SourceResult { /// ``` /// #odd(4) \ /// #odd(5) \ -/// { range(10).filter(odd) } +/// #range(10).filter(odd) /// ``` /// /// diff --git a/library/src/compute/construct.rs b/library/src/compute/construct.rs index 5a8aa05e7..784513f64 100644 --- a/library/src/compute/construct.rs +++ b/library/src/compute/construct.rs @@ -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 { /// The numbers 1 to 10. /// /// // Works with string methods. -/// { "a,b;c" +/// #{ "a,b;c" /// .split(regex("[,;]")) } /// ``` /// diff --git a/library/src/compute/data.rs b/library/src/compute/data.rs index bf747ec6b..63e137e65 100644 --- a/library/src/compute/data.rs +++ b/library/src/compute/data.rs @@ -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 { diff --git a/library/src/layout/container.rs b/library/src/layout/container.rs index 8a772f2d5..afbce576b 100644 --- a/library/src/layout/container.rs +++ b/library/src/layout/container.rs @@ -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