diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-02-13 12:04:26 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-02-13 12:18:34 +0100 |
| commit | 72b60dfde751b4a2ab279aa1fcfa559b4a75eb51 (patch) | |
| tree | 013065649ef0972bd342ad5c5821842a9c48c740 /library/src/text/raw.rs | |
| parent | db49b628f73d3c328aacadbb9126616e7cccfc49 (diff) | |
Fill and stroke properties for containers
Diffstat (limited to 'library/src/text/raw.rs')
| -rw-r--r-- | library/src/text/raw.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/library/src/text/raw.rs b/library/src/text/raw.rs index d29cb7bf..a20ec6f3 100644 --- a/library/src/text/raw.rs +++ b/library/src/text/raw.rs @@ -63,17 +63,16 @@ use crate::prelude::*; /// ````example /// // Display inline code in a small box /// // that retains the correct baseline. -/// #show raw.where(block: false): it => box(rect( +/// #show raw.where(block: false): box.with( /// fill: luma(240), /// inset: (x: 3pt, y: 0pt), /// outset: (y: 3pt), /// radius: 2pt, -/// it, -/// )) +/// ) /// -/// // Display block code in a larger box +/// // Display block code in a larger block /// // with more padding. -/// #show raw.where(block: true): rect.with( +/// #show raw.where(block: true): block.with( /// fill: luma(240), /// inset: 10pt, /// radius: 4pt, @@ -200,7 +199,7 @@ impl Show for RawNode { }; if self.block { - realized = BlockNode(realized).pack(); + realized = BlockNode { body: realized }.pack(); } Ok(realized) |
