From 72b60dfde751b4a2ab279aa1fcfa559b4a75eb51 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 13 Feb 2023 12:04:26 +0100 Subject: Fill and stroke properties for containers --- library/src/text/raw.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'library/src/text') 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) -- cgit v1.2.3