diff options
Diffstat (limited to 'library/src/text/shift.rs')
| -rw-r--r-- | library/src/text/shift.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/library/src/text/shift.rs b/library/src/text/shift.rs index 1117cc00..0f654b5a 100644 --- a/library/src/text/shift.rs +++ b/library/src/text/shift.rs @@ -33,12 +33,6 @@ impl<const S: ShiftKind> ShiftNode<S> { fn construct(_: &mut Vm, args: &mut Args) -> SourceResult<Content> { Ok(Self(args.expect("body")?).pack()) } -} - -impl<const S: ShiftKind> Show for ShiftNode<S> { - fn unguard_parts(&self, _: Selector) -> Content { - Self(self.0.clone()).pack() - } fn field(&self, name: &str) -> Option<Value> { match name { @@ -46,8 +40,14 @@ impl<const S: ShiftKind> Show for ShiftNode<S> { _ => None, } } +} + +impl<const S: ShiftKind> Show for ShiftNode<S> { + fn unguard_parts(&self, _: Selector) -> Content { + Self(self.0.clone()).pack() + } - fn realize( + fn show( &self, world: Tracked<dyn World>, styles: StyleChain, @@ -56,7 +56,7 @@ impl<const S: ShiftKind> Show for ShiftNode<S> { if styles.get(Self::TYPOGRAPHIC) { if let Some(text) = search_text(&self.0, S) { if is_shapable(world, &text, styles) { - transformed = Some(TextNode(text).pack()); + transformed = Some(TextNode::packed(text)); } } }; |
