diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-10-31 13:49:10 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-10-31 13:49:10 +0100 |
| commit | 671ce3dedd40067bb5cea84fe0739de013827053 (patch) | |
| tree | a4c990fc16b514f475dfceaa98d988e92ac6cf0c /src/library/text/shift.rs | |
| parent | 636bdb9e438cfe4fb075a981e0512b9a3dde3e60 (diff) | |
Replace `encode` with `field`
Diffstat (limited to 'src/library/text/shift.rs')
| -rw-r--r-- | src/library/text/shift.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/library/text/shift.rs b/src/library/text/shift.rs index adad5dc0..e2a636a6 100644 --- a/src/library/text/shift.rs +++ b/src/library/text/shift.rs @@ -38,8 +38,11 @@ impl<const S: ScriptKind> Show for ShiftNode<S> { Self(self.0.clone()).pack() } - fn encode(&self, _: StyleChain) -> Dict { - dict! { "body" => Value::Content(self.0.clone()) } + fn field(&self, name: &str) -> Option<Value> { + match name { + "body" => Some(Value::Content(self.0.clone())), + _ => None, + } } fn realize( |
