diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-05-17 14:41:46 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-05-17 14:41:46 +0200 |
| commit | 551ea99d05166b0be50792f767ddd38b996e32fa (patch) | |
| tree | ec5e86a087e79e8c181c7d4b904216a775227e2d /library/src/layout/container.rs | |
| parent | 46aace78ac4ac1c075b9b1670dbb7372df1a0a82 (diff) | |
Show default values in documentation
Fixes #169
Fixes #1102
Diffstat (limited to 'library/src/layout/container.rs')
| -rw-r--r-- | library/src/layout/container.rs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/library/src/layout/container.rs b/library/src/layout/container.rs index 04c58075..b7d0ba2f 100644 --- a/library/src/layout/container.rs +++ b/library/src/layout/container.rs @@ -229,7 +229,6 @@ pub struct BlockElem { /// Whether the block can be broken and continue on the next page. /// - /// Defaults to `{true}`. /// ```example /// #set page(height: 80pt) /// The following block will @@ -282,13 +281,16 @@ pub struct BlockElem { /// A second paragraph. /// ``` #[external] + #[default(Em::new(1.2).into())] pub spacing: Spacing, /// The spacing between this block and its predecessor. Takes precedence /// over `spacing`. Can be used in combination with a show rule to adjust /// the spacing around arbitrary block-level elements. - /// - /// The default value is `{1.2em}`. + #[external] + #[default(Em::new(1.2).into())] + pub above: Spacing, + #[internal] #[parse( let spacing = args.named("spacing")?; args.named("above")? @@ -300,8 +302,10 @@ pub struct BlockElem { /// The spacing between this block and its successor. Takes precedence /// over `spacing`. - /// - /// The default value is `{1.2em}`. + #[external] + #[default(Em::new(1.2).into())] + pub below: Spacing, + #[internal] #[parse( args.named("below")? .map(VElem::block_around) |
