diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-02-22 14:31:09 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-02-23 14:53:55 +0100 |
| commit | e1f29d6cb9437a4afb2e4fc4ee10a5b8717ab9fa (patch) | |
| tree | 1ce5f2bd858f6665d3867a2939d4b474c1b70377 /src/library/raw.rs | |
| parent | 2bf32c51bceb2f3a8b7ebea3d7c7d6d96757591b (diff) | |
Rework the core context
Diffstat (limited to 'src/library/raw.rs')
| -rw-r--r-- | src/library/raw.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/library/raw.rs b/src/library/raw.rs index bb4e2c96..785eeac5 100644 --- a/src/library/raw.rs +++ b/src/library/raw.rs @@ -31,7 +31,7 @@ impl RawNode { /// The language to syntax-highlight in. pub const LANG: Option<EcoString> = None; - fn construct(_: &mut Vm, args: &mut Args) -> TypResult<Template> { + fn construct(_: &mut Context, args: &mut Args) -> TypResult<Template> { Ok(Template::show(Self { text: args.expect("text")?, block: args.named("block")?.unwrap_or(false), @@ -40,10 +40,10 @@ impl RawNode { } impl Show for RawNode { - fn show(&self, vm: &mut Vm, styles: StyleChain) -> TypResult<Template> { + fn show(&self, ctx: &mut Context, styles: StyleChain) -> TypResult<Template> { let lang = styles.get_ref(Self::LANG).as_ref(); - if let Some(template) = styles.show(self, vm, [ + if let Some(template) = styles.show(self, ctx, [ Value::Str(self.text.clone()), match lang { Some(lang) => Value::Str(lang.clone()), |
