diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-03-11 12:59:55 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-03-11 23:36:06 +0100 |
| commit | 5ac7eb3860ebd3247f6486c227e816894cb8fd91 (patch) | |
| tree | a29a868c681c7de39f15f2d9d3f031db1861b90a /src/library/math | |
| parent | 5ce2a006b6d45d29be15e4562ae3ab4fc1b8e97c (diff) | |
Rename template to content
Diffstat (limited to 'src/library/math')
| -rw-r--r-- | src/library/math/mod.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/library/math/mod.rs b/src/library/math/mod.rs index c5b79117..b43db22e 100644 --- a/src/library/math/mod.rs +++ b/src/library/math/mod.rs @@ -13,8 +13,8 @@ pub struct MathNode { #[class] impl MathNode { - fn construct(_: &mut Context, args: &mut Args) -> TypResult<Template> { - Ok(Template::show(Self { + fn construct(_: &mut Context, args: &mut Args) -> TypResult<Content> { + Ok(Content::show(Self { formula: args.expect("formula")?, display: args.named("display")?.unwrap_or(false), })) @@ -22,18 +22,18 @@ impl MathNode { } impl Show for MathNode { - fn show(&self, ctx: &mut Context, styles: StyleChain) -> TypResult<Template> { + fn show(&self, ctx: &mut Context, styles: StyleChain) -> TypResult<Content> { Ok(styles .show(self, ctx, [ Value::Str(self.formula.clone()), Value::Bool(self.display), ])? .unwrap_or_else(|| { - let mut template = Template::Text(self.formula.trim().into()); + let mut content = Content::Text(self.formula.trim().into()); if self.display { - template = Template::Block(template.pack()); + content = Content::Block(content.pack()); } - template.monospaced() + content.monospaced() })) } } |
