summaryrefslogtreecommitdiff
path: root/crates/typst-library/src/pdf
diff options
context:
space:
mode:
Diffstat (limited to 'crates/typst-library/src/pdf')
-rw-r--r--crates/typst-library/src/pdf/mod.rs19
1 files changed, 5 insertions, 14 deletions
diff --git a/crates/typst-library/src/pdf/mod.rs b/crates/typst-library/src/pdf/mod.rs
index 3bd3b0c5..786a3637 100644
--- a/crates/typst-library/src/pdf/mod.rs
+++ b/crates/typst-library/src/pdf/mod.rs
@@ -4,21 +4,12 @@ mod embed;
pub use self::embed::*;
-use crate::foundations::{category, Category, Module, Scope};
-
-/// PDF-specific functionality.
-#[category]
-pub static PDF: Category;
-
-/// Hook up the `pdf` module.
-pub(super) fn define(global: &mut Scope) {
- global.start_category(PDF);
- global.define("pdf", module());
-}
+use crate::foundations::{Module, Scope};
/// Hook up all `pdf` definitions.
pub fn module() -> Module {
- let mut scope = Scope::deduplicating();
- scope.define_elem::<EmbedElem>();
- Module::new("pdf", scope)
+ let mut pdf = Scope::deduplicating();
+ pdf.start_category(crate::Category::Pdf);
+ pdf.define_elem::<EmbedElem>();
+ Module::new("pdf", pdf)
}