diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-02-06 11:52:09 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-02-06 11:52:09 +0100 |
| commit | ea8edfa821f059921550c45d4f0267160b638a04 (patch) | |
| tree | 940c358e400e55bc1ba47faf7c1fa07611af5241 /library/src/layout | |
| parent | 0bb0f1c98fc8eff5d7556bbe9d5801f02237a5c0 (diff) | |
Make Rust happier about the inline documentation
Diffstat (limited to 'library/src/layout')
| -rw-r--r-- | library/src/layout/align.rs | 11 | ||||
| -rw-r--r-- | library/src/layout/columns.rs | 12 | ||||
| -rw-r--r-- | library/src/layout/container.rs | 23 | ||||
| -rw-r--r-- | library/src/layout/grid.rs | 14 | ||||
| -rw-r--r-- | library/src/layout/hide.rs | 4 | ||||
| -rw-r--r-- | library/src/layout/pad.rs | 18 | ||||
| -rw-r--r-- | library/src/layout/page.rs | 43 | ||||
| -rw-r--r-- | library/src/layout/par.rs | 33 | ||||
| -rw-r--r-- | library/src/layout/place.rs | 13 | ||||
| -rw-r--r-- | library/src/layout/repeat.rs | 4 | ||||
| -rw-r--r-- | library/src/layout/spacing.rs | 22 | ||||
| -rw-r--r-- | library/src/layout/stack.rs | 8 | ||||
| -rw-r--r-- | library/src/layout/transform.rs | 34 |
13 files changed, 113 insertions, 126 deletions
diff --git a/library/src/layout/align.rs b/library/src/layout/align.rs index 35b1026e..b84ccfdc 100644 --- a/library/src/layout/align.rs +++ b/library/src/layout/align.rs @@ -4,7 +4,7 @@ use crate::prelude::*; /// Align content horizontally and vertically. /// /// ## Example -/// ``` +/// ```example /// #set align(center) /// /// Centered text, a sight to see \ @@ -14,10 +14,10 @@ use crate::prelude::*; /// ``` /// /// ## Parameters -/// - body: Content (positional, required) +/// - body: `Content` (positional, required) /// The content to align. /// -/// - alignment: Axes<Option<GenAlign>> (positional, settable) +/// - alignment: `Axes<Option<GenAlign>>` (positional, settable) /// The alignment along both axes. /// /// Possible values for horizontal alignments are: @@ -28,7 +28,7 @@ use crate::prelude::*; /// - `right` /// /// The `start` and `end` alignments are relative to the current [text -/// direction](@text/dir). +/// direction]($func/text.dir). /// /// Possible values for vertical alignments are: /// - `top` @@ -39,8 +39,7 @@ use crate::prelude::*; /// the `+` operator to get a `2d alignment`. For example, `top + right` /// aligns the content to the top right corner. /// -/// ### Example -/// ``` +/// ```example /// #set page(height: 6cm) /// #set text(lang: "ar") /// diff --git a/library/src/layout/columns.rs b/library/src/layout/columns.rs index 2b09bb69..55cda5d8 100644 --- a/library/src/layout/columns.rs +++ b/library/src/layout/columns.rs @@ -11,7 +11,7 @@ use crate::text::TextNode; /// necessary. /// /// ## Example -/// ``` +/// ```example /// = Towards Advanced Deep Learning /// /// #box(height: 68pt, @@ -32,10 +32,10 @@ use crate::text::TextNode; /// ``` /// /// ## Parameters -/// - count: usize (positional, required) +/// - count: `usize` (positional, required) /// The number of columns. /// -/// - body: Content (positional, required) +/// - body: `Content` (positional, required) /// The content that should be layouted into the columns. /// /// ## Category @@ -151,12 +151,12 @@ impl Layout for ColumnsNode { /// # Column Break /// A forced column break. /// -/// The function will behave like a [page break](@pagebreak) when used in a +/// The function will behave like a [page break]($func/pagebreak) when used in a /// single column layout or the last column on a page. Otherwise, content after /// the column break will be placed in the next column. /// /// ## Example -/// ``` +/// ```example /// #set page(columns: 2) /// Preliminary findings from our /// ongoing research project have @@ -174,7 +174,7 @@ impl Layout for ColumnsNode { /// ``` /// /// ## Parameters -/// - weak: bool (named) +/// - weak: `bool` (named) /// If `{true}`, the column break is skipped if the current column is already /// empty. /// diff --git a/library/src/layout/container.rs b/library/src/layout/container.rs index afbce576..094ed05a 100644 --- a/library/src/layout/container.rs +++ b/library/src/layout/container.rs @@ -11,11 +11,12 @@ use crate::prelude::*; /// explicitly. /// /// _Note:_ While the behavior above will be the default in the future, the -/// transformation functions [`scale`](@scale), [`rotate`](@rotate), and -/// [`move`](@move) will currently yield inline nodes within paragraphs. +/// transformation functions [`scale`]($func/scale), [`rotate`]($func/rotate), +/// and [`move`]($func/move) will currently yield inline nodes within +/// paragraphs. /// /// ## Example -/// ``` +/// ```example /// Refer to the docs /// #box( /// height: 9pt, @@ -25,13 +26,13 @@ use crate::prelude::*; /// ``` /// /// ## Parameters -/// - body: Content (positional) +/// - body: `Content` (positional) /// The contents of the box. /// -/// - width: Rel<Length> (named) +/// - width: `Rel<Length>` (named) /// The width of the box. /// -/// - height: Rel<Length> (named) +/// - height: `Rel<Length>` (named) /// The height of the box. /// /// ## Category @@ -109,7 +110,7 @@ impl Inline for BoxNode {} /// block-level. This is especially useful when writing show rules. /// /// ## Example -/// ``` +/// ```example /// #[ /// #show heading: it => it.title /// = No block @@ -124,19 +125,19 @@ impl Inline for BoxNode {} /// ``` /// /// ## Parameters -/// - body: Content (positional) +/// - body: `Content` (positional) /// The contents of the block. /// -/// - spacing: Spacing (named, settable) +/// - spacing: `Spacing` (named, settable) /// The spacing around this block. /// -/// - above: Spacing (named, settable) +/// - above: `Spacing` (named, settable) /// The spacing between this block and its predecessor. Takes precedence over /// `spacing`. /// /// The default value is `{1.2em}`. /// -/// - below: Spacing (named, settable) +/// - below: `Spacing` (named, settable) /// The spacing between this block and its successor. Takes precedence /// over `spacing`. /// diff --git a/library/src/layout/grid.rs b/library/src/layout/grid.rs index a3ee5df7..60a5e748 100644 --- a/library/src/layout/grid.rs +++ b/library/src/layout/grid.rs @@ -35,7 +35,7 @@ use super::Spacing; /// `columns:` `{(auto, auto, auto)}`. /// /// ## Example -/// ``` +/// ```example /// #set text(10pt, weight: "bold") /// #let cell = rect.with( /// inset: 8pt, @@ -60,30 +60,30 @@ use super::Spacing; /// ``` /// /// ## Parameters -/// - cells: Content (positional, variadic) The contents of the table cells. +/// - cells: `Content` (positional, variadic) The contents of the table cells. /// /// The cells are populated in row-major order. /// -/// - rows: TrackSizings (named) Defines the row sizes. +/// - rows: `TrackSizings` (named) Defines the row sizes. /// /// If there are more cells than fit the defined rows, the last row is /// repeated until there are no more cells. /// -/// - columns: TrackSizings (named) Defines the column sizes. +/// - columns: `TrackSizings` (named) Defines the column sizes. /// /// Either specify a track size array or provide an integer to create a grid /// with that many `{auto}`-sized columns. Note that opposed to rows and /// gutters, providing a single track size will only ever create a single /// column. /// -/// - gutter: TrackSizings (named) Defines the gaps between rows & columns. +/// - gutter: `TrackSizings` (named) Defines the gaps between rows & columns. /// /// If there are more gutters than defined sizes, the last gutter is repeated. /// -/// - column-gutter: TrackSizings (named) Defines the gaps between columns. +/// - column-gutter: `TrackSizings` (named) Defines the gaps between columns. /// Takes precedence over `gutter`. /// -/// - row-gutter: TrackSizings (named) Defines the gaps between rows. Takes +/// - row-gutter: `TrackSizings` (named) Defines the gaps between rows. Takes /// precedence over `gutter`. /// /// ## Category diff --git a/library/src/layout/hide.rs b/library/src/layout/hide.rs index 01ae48c5..cedc2489 100644 --- a/library/src/layout/hide.rs +++ b/library/src/layout/hide.rs @@ -9,13 +9,13 @@ use crate::prelude::*; /// not included in the output. /// /// ## Example -/// ``` +/// ```example /// Hello Jane \ /// #hide[Hello] Joe /// ``` /// /// ## Parameters -/// - body: Content (positional, required) +/// - body: `Content` (positional, required) /// The content to hide. /// /// ## Category diff --git a/library/src/layout/pad.rs b/library/src/layout/pad.rs index 5c10050c..aeea430b 100644 --- a/library/src/layout/pad.rs +++ b/library/src/layout/pad.rs @@ -8,7 +8,7 @@ use crate::prelude::*; /// positional argument. /// /// ## Example -/// ``` +/// ```example /// #set align(center) /// /// #pad(x: 16pt, image("typing.jpg")) @@ -17,28 +17,28 @@ use crate::prelude::*; /// ``` /// /// ## Parameters -/// - body: Content (positional, required) +/// - body: `Content` (positional, required) /// The content to pad at the sides. /// -/// - left: Rel<Length> (named) +/// - left: `Rel<Length>` (named) /// The padding at the left side. /// -/// - right: Rel<Length> (named) +/// - right: `Rel<Length>` (named) /// The padding at the right side. /// -/// - top: Rel<Length> (named) +/// - top: `Rel<Length>` (named) /// The padding at the top side. /// -/// - bottom: Rel<Length> (named) +/// - bottom: `Rel<Length>` (named) /// The padding at the bottom side. /// -/// - x: Rel<Length> (named) +/// - x: `Rel<Length>` (named) /// The horizontal padding. Both `left` and `right` take precedence over this. /// -/// - y: Rel<Length> (named) +/// - y: `Rel<Length>` (named) /// The vertical padding. Both `top` and `bottom` take precedence over this. /// -/// - rest: Rel<Length> (named) +/// - rest: `Rel<Length>` (named) /// The padding for all sides. All other parameters take precedence over this. /// /// ## Category diff --git a/library/src/layout/page.rs b/library/src/layout/page.rs index 4f5231de..3de12634 100644 --- a/library/src/layout/page.rs +++ b/library/src/layout/page.rs @@ -14,19 +14,19 @@ use crate::prelude::*; /// the pages will grow to fit their content on the respective axis. /// /// ## Parameters -/// - body: Content (positional, required) +/// - body: `Content` (positional, required) /// The contents of the page(s). /// /// Multiple pages will be created if the content does not fit on a single /// page. A new page with the page properties prior to the function invocation /// will be created after the body has been typeset. /// -/// - paper: Paper (positional, settable) +/// - paper: `Paper` (positional, settable) /// A standard paper size to set width and height. When this is not specified, /// Typst defaults to `{"a4"}` paper. /// /// ## Example -/// ``` +/// ```example /// >>> #set page(margin: auto) /// #set page("us-letter") /// @@ -44,8 +44,7 @@ pub struct PageNode(pub Content); impl PageNode { /// The width of the page. /// - /// # Example - /// ``` + /// ```example /// #set page( /// width: 3cm, /// margin: (x: 0cm), @@ -61,16 +60,15 @@ impl PageNode { /// The height of the page. /// /// If this is set to `{auto}`, page breaks can only be triggered manually - /// by inserting a [page break](@pagebreak). Most examples throughout this - /// documentation use `{auto}` for the height of the page to dynamically - /// grow and shrink to fit their content. + /// by inserting a [page break]($func/pagebreak). Most examples throughout + /// this documentation use `{auto}` for the height of the page to + /// dynamically grow and shrink to fit their content. #[property(resolve)] pub const HEIGHT: Smart<Length> = Smart::Custom(Paper::A4.height().into()); /// Whether the page is flipped into landscape orientation. /// - /// # Example - /// ``` + /// ```example /// #set page( /// "us-business-card", /// flipped: true, @@ -103,8 +101,7 @@ impl PageNode { /// - `rest`: The margins on all sides except those for which the /// dictionary explicitly sets a size. /// - /// # Example - /// ``` + /// ```example /// #set page( /// width: 3cm, /// height: 4cm, @@ -122,8 +119,7 @@ impl PageNode { /// How many columns the page has. /// - /// # Example - /// ``` + /// ```example /// #set page(columns: 2, height: 4.8cm) /// Climate change is one of the most /// pressing issues of our time, with @@ -144,8 +140,7 @@ impl PageNode { /// environmentally friendly and cost-effective to source pre-dyed pages and /// not set this property. /// - /// # Example - /// ``` + /// ```example /// #set page(fill: rgb("444352")) /// #set text(fill: rgb("fdfdfd")) /// *Dark mode enabled.* @@ -162,8 +157,7 @@ impl PageNode { /// the header. /// - `{none}`: The header will be empty. /// - /// # Example - /// ``` + /// ```example /// #set par(justify: true) /// #set page( /// margin: (x: 24pt, y: 32pt), @@ -185,8 +179,7 @@ impl PageNode { /// the footer. /// - `{none}`: The footer will be empty. /// - /// # Example - /// ``` + /// ```example /// #set par(justify: true) /// #set page( /// margin: (x: 24pt, y: 32pt), @@ -205,8 +198,7 @@ impl PageNode { /// This content will be placed behind the page's body. It can be /// used to place a background image or a watermark. /// - /// # Example - /// ``` + /// ```example /// #set page(background: align( /// center + horizon, /// rotate(24deg, @@ -226,8 +218,7 @@ impl PageNode { /// /// This content will overlay the page's body. /// - /// # Example - /// ``` + /// ```example /// #set page(foreground: align( /// center + horizon, /// text(24pt)[🥸], @@ -355,7 +346,7 @@ impl Debug for PageNode { /// A manually forced page break. It must not be used inside any containers. /// /// ## Example -/// ``` +/// ```example /// The next page contains /// more details on compound theory. /// #pagebreak() @@ -366,7 +357,7 @@ impl Debug for PageNode { /// ``` /// /// ## Parameters -/// - weak: bool (named) +/// - weak: `bool` (named) /// If `{true}`, the page break is skipped if the current page is already empty. /// /// ## Category diff --git a/library/src/layout/par.rs b/library/src/layout/par.rs index 2427aa98..a629853a 100644 --- a/library/src/layout/par.rs +++ b/library/src/layout/par.rs @@ -19,7 +19,7 @@ use crate::text::{ /// paragraph of its own. /// /// ## Example -/// ``` +/// ```example /// #set par(indent: 1em, justify: true) /// #show par: set block(spacing: 0.65em) /// @@ -36,7 +36,7 @@ use crate::text::{ /// ``` /// /// ## Parameters -/// - body: Content (positional, required) +/// - body: `Content` (positional, required) /// The contents of the paragraph. /// /// ## Category @@ -54,8 +54,8 @@ impl ParNode { /// /// By typographic convention, paragraph breaks are indicated by either some /// space between paragraphs or indented first lines. Consider turning the - /// [paragraph spacing](@block/spacing) off when using this property (e.g. - /// using `[#show par: set block(spacing: 0pt)]`). + /// [paragraph spacing]($func/block.spacing) off when using this property + /// (e.g. using `[#show par: set block(spacing: 0pt)]`). #[property(resolve)] pub const INDENT: Length = Length::zero(); @@ -68,12 +68,12 @@ impl ParNode { /// Whether to justify text in its line. /// /// Hyphenation will be enabled for justified paragraphs if the [text - /// property hyphenate](@text/hyphenate) is set to `{auto}` and the current - /// language is known. + /// property hyphenate]($func/text.hyphenate) is set to `{auto}` and the + /// current language is known. /// - /// Note that the current [alignment](@align) still has an effect on the - /// placement of the last line except if it ends with a [justified line - /// break](@linebreak/justify). + /// Note that the current [alignment]($func/align) still has an effect on + /// the placement of the last line except if it ends with a [justified line + /// break]($func/linebreak.justify). pub const JUSTIFY: bool = false; /// How to determine line breaks. @@ -83,8 +83,7 @@ impl ParNode { /// breaks for ragged paragraphs may also be worthwhile to improve the /// appearance of the text. /// - /// # Example - /// ``` + /// ```example /// #set page(width: 190pt) /// #set par(linebreaks: "simple") /// Some texts are frustratingly @@ -219,15 +218,11 @@ castable! { /// A paragraph break. /// /// This starts a new paragraph. Especially useful when used within code like -/// [for loops](/docs/reference/scripting/#loops). Multiple consecutive +/// [for loops]($scripting/#loops). Multiple consecutive /// paragraph breaks collapse into a single one. /// -/// ## Syntax -/// Instead of calling this function, you can insert a blank line into your -/// markup to create a paragraph break. -/// /// ## Example -/// ``` +/// ```example /// #for i in range(3) { /// [Blind text #i: ] /// lorem(5) @@ -235,6 +230,10 @@ castable! { /// } /// ``` /// +/// ## Syntax +/// Instead of calling this function, you can insert a blank line into your +/// markup to create a paragraph break. +/// /// ## Category /// layout #[func] diff --git a/library/src/layout/place.rs b/library/src/layout/place.rs index c51c8289..16b091fe 100644 --- a/library/src/layout/place.rs +++ b/library/src/layout/place.rs @@ -9,7 +9,7 @@ use crate::prelude::*; /// /// /// ## Example -/// ``` +/// ```example /// #set page(height: 60pt) /// Hello, world! /// @@ -23,21 +23,20 @@ use crate::prelude::*; /// ``` /// /// ## Parameters -/// - alignment: Axes<Option<GenAlign>> (positional) +/// - alignment: `Axes<Option<GenAlign>>` (positional) /// Relative to which position in the parent container to place the content. /// /// When an axis of the page is `{auto}` sized, all alignments relative to that /// axis will be ignored, instead, the item will be placed in the origin of the /// axis. /// -/// - body: Content (positional, required) +/// - body: `Content` (positional, required) /// The content to place. /// -/// - dx: Rel<Length> (named) +/// - dx: `Rel<Length>` (named) /// The horizontal displacement of the placed content. /// -/// ### Example -/// ``` +/// ```example /// #set align(center) /// /// #box( @@ -52,7 +51,7 @@ use crate::prelude::*; /// ) /// ``` /// -/// - dy: Rel<Length> (named) +/// - dy: `Rel<Length>` (named) /// The vertical displacement of the placed content. /// /// ## Category diff --git a/library/src/layout/repeat.rs b/library/src/layout/repeat.rs index df88bac5..06806fb0 100644 --- a/library/src/layout/repeat.rs +++ b/library/src/layout/repeat.rs @@ -9,7 +9,7 @@ use crate::prelude::*; /// sure to include negative space if you need the instances to overlap. /// /// ## Example -/// ``` +/// ```example /// Sign on the dotted line: #repeat[.] /// /// #set text(10pt) @@ -20,7 +20,7 @@ use crate::prelude::*; /// ``` /// /// ## Parameters -/// - body: Content (positional, required) +/// - body: `Content` (positional, required) /// The content to repeat. /// /// ## Category diff --git a/library/src/layout/spacing.rs b/library/src/layout/spacing.rs index 640cd53a..17f6b5be 100644 --- a/library/src/layout/spacing.rs +++ b/library/src/layout/spacing.rs @@ -10,7 +10,7 @@ use crate::prelude::*; /// according to their relative fractions. /// /// ## Example -/// ``` +/// ```example /// #circle(fill: red) /// #h(1fr) /// #circle(fill: yellow) @@ -18,17 +18,20 @@ use crate::prelude::*; /// #circle(fill: green) /// ``` /// +/// ## Mathematical Spacing +/// In [mathematical formulas]($category/math), you can additionally use these +/// constants to add spacing between elements: `thin`, `med`, `thick, `quad`. +/// /// ## Parameters -/// - amount: Spacing (positional, required) +/// - amount: `Spacing` (positional, required) /// How much spacing to insert. /// -/// - weak: bool (named) +/// - weak: `bool` (named) /// If true, the spacing collapses at the start or end of a paragraph. /// Moreover, from multiple adjacent weak spacings all but the largest one /// collapse. /// -/// ### Example -/// ``` +/// ```example /// #h(1cm, weak: true) /// We identified a group of /// _weak_ specimens that fail to @@ -105,7 +108,7 @@ impl Behave for HNode { /// according to their relative fractions. /// /// ## Example -/// ``` +/// ```example /// In this report, we will explore /// the various ethical /// considerations that must be @@ -121,17 +124,16 @@ impl Behave for HNode { /// ``` /// /// ## Parameters -/// - amount: Spacing (positional, required) +/// - amount: `Spacing` (positional, required) /// How much spacing to insert. /// -/// - weak: bool (named) +/// - weak: `bool` (named) /// If true, the spacing collapses at the start or end of a flow. Moreover, /// from multiple adjacent weak spacings all but the largest one collapse. /// Weak spacings will always collapse adjacent paragraph spacing, even if the /// paragraph spacing is larger. /// -/// ### Example -/// ``` +/// ```example /// The following theorem is /// foundational to the field: /// #v(4pt, weak: true) diff --git a/library/src/layout/stack.rs b/library/src/layout/stack.rs index 0fd0f235..54b03bdc 100644 --- a/library/src/layout/stack.rs +++ b/library/src/layout/stack.rs @@ -10,7 +10,7 @@ use crate::prelude::*; /// between each item. /// /// ## Example -/// ``` +/// ```example /// #stack( /// dir: ttb, /// rect(width: 40pt), @@ -20,10 +20,10 @@ use crate::prelude::*; /// ``` /// /// ## Parameters -/// - items: StackChild (positional, variadic) +/// - items: `StackChild` (positional, variadic) /// The items to stack along an axis. /// -/// - dir: Dir (named) +/// - dir: `Dir` (named) /// The direction along which the items are stacked. Possible values are: /// /// - `{ltr}`: Left to right. @@ -31,7 +31,7 @@ use crate::prelude::*; /// - `{ttb}`: Top to bottom. /// - `{btt}`: Bottom to top. /// -/// - spacing: Spacing (named) +/// - spacing: `Spacing` (named) /// Spacing to insert between items where no explicit spacing was provided. /// /// ## Category diff --git a/library/src/layout/transform.rs b/library/src/layout/transform.rs index 09b4350d..e3fd3250 100644 --- a/library/src/layout/transform.rs +++ b/library/src/layout/transform.rs @@ -10,7 +10,7 @@ use crate::prelude::*; /// was not moved. /// /// ## Example -/// ``` +/// ```example /// #rect(inset: 0pt, move( /// dx: 6pt, dy: 6pt, /// rect( @@ -23,18 +23,17 @@ use crate::prelude::*; /// ``` /// /// ## Parameters -/// - body: Content (positional, required) +/// - body: `Content` (positional, required) /// The content to move. /// -/// ### Example -/// ``` +/// ```example /// Hello, world!#move(dy: -2pt)[!]#move(dy: 2pt)[!] /// ``` /// -/// - dx: Rel<Length> (named) +/// - dx: `Rel<Length>` (named) /// The horizontal displacement of the content. /// -/// - dy: Rel<Length> (named) +/// - dy: `Rel<Length>` (named) /// The vertical displacement of the content. /// /// ## Category @@ -95,7 +94,7 @@ impl Inline for MoveNode {} /// was not rotated. /// /// ## Example -/// ``` +/// ```example /// #{ /// range(16) /// .map(i => rotate(24deg * i)[X]) @@ -104,14 +103,13 @@ impl Inline for MoveNode {} /// ``` /// /// ## Parameters -/// - body: Content (positional, required) +/// - body: `Content` (positional, required) /// The content to rotate. /// -/// - angle: Angle (named) +/// - angle: `Angle` (named) /// The amount of rotation. /// -/// ### Example -/// ``` +/// ```example /// #rotate(angle: -1.571rad)[To space!] /// ``` /// @@ -136,8 +134,7 @@ impl RotateNode { /// stay aligned with the baseline, you would set the origin to `bottom + /// left`. /// - /// # Example - /// ``` + /// ```example /// #set text(spacing: 8pt) /// #let square = square.with(width: 8pt) /// @@ -195,21 +192,21 @@ impl Inline for RotateNode {} /// /// /// ## Example -/// ``` +/// ```example /// #set align(center) /// #scale(x: -100%)[👍]👩🦱👍 /// ``` /// /// ## Parameters -/// - body: Content (positional, required) +/// - body: `Content` (positional, required) /// The content to scale. /// -/// - x: Ratio (named) +/// - x: `Ratio` (named) /// The horizontal scaling factor. /// /// The body will be mirrored horizontally if the parameter is negative. /// -/// - y: Ratio (named) +/// - y: `Ratio` (named) /// The vertical scaling factor. /// /// The body will be mirrored vertically if the parameter is negative. @@ -232,8 +229,7 @@ impl ScaleNode { /// /// By default, the origin is the center of the scaled element. /// - /// # Example - /// ``` + /// ```example /// A#scale(75%)[A]A \ /// B#scale(75%, origin: bottom + left)[B]B /// ``` |
