diff options
| author | Laurenz <laurmaedje@gmail.com> | 2024-12-02 13:34:02 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2024-12-04 10:12:07 +0100 |
| commit | d00a5d6c9b35e4a340be8df18a11943e3591b86a (patch) | |
| tree | 699ef153f8444989c9e27d037bdbdff4931065c3 /crates/typst-library/src/lib.rs | |
| parent | 2b8dc9b14da365cb36345d41fd1ca93894f50c68 (diff) | |
Add contextual `target` function
Diffstat (limited to 'crates/typst-library/src/lib.rs')
| -rw-r--r-- | crates/typst-library/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/typst-library/src/lib.rs b/crates/typst-library/src/lib.rs index 5aec0916..a2bb61f3 100644 --- a/crates/typst-library/src/lib.rs +++ b/crates/typst-library/src/lib.rs @@ -193,7 +193,7 @@ impl LibraryBuilder { pub fn build(self) -> Library { let math = math::module(); let inputs = self.inputs.unwrap_or_default(); - let global = global(math.clone(), inputs); + let global = global(math.clone(), inputs, &self.features); let std = Value::Module(global.clone()); Library { global, @@ -236,9 +236,9 @@ pub enum Feature { } /// Construct the module with global definitions. -fn global(math: Module, inputs: Dict) -> Module { +fn global(math: Module, inputs: Dict, features: &Features) -> Module { let mut global = Scope::deduplicating(); - self::foundations::define(&mut global, inputs); + self::foundations::define(&mut global, inputs, features); self::model::define(&mut global); self::text::define(&mut global); global.reset_category(); |
