diff options
| author | Laurenz <laurmaedje@gmail.com> | 2024-01-17 21:50:35 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2024-01-17 21:53:20 +0100 |
| commit | 6ac71eeaf7b68dab07f75bd1a480810481fa9b73 (patch) | |
| tree | d452e7323200fe56d61a34b91c8b98826d60978c /crates/typst-docs/src/lib.rs | |
| parent | 50741209a8f4c5e91d35281eb44b7425b3d022b2 (diff) | |
Add `Page` struct
To get rid of the Meta hack where numbering and things like that are stored in the frame.
Diffstat (limited to 'crates/typst-docs/src/lib.rs')
| -rw-r--r-- | crates/typst-docs/src/lib.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/typst-docs/src/lib.rs b/crates/typst-docs/src/lib.rs index ad40b987..f2531462 100644 --- a/crates/typst-docs/src/lib.rs +++ b/crates/typst-docs/src/lib.rs @@ -25,9 +25,10 @@ use typst::foundations::{ FOUNDATIONS, }; use typst::introspection::INTROSPECTION; -use typst::layout::{Abs, Frame, Margin, PageElem, LAYOUT}; +use typst::layout::{Abs, Margin, PageElem, LAYOUT}; use typst::loading::DATA_LOADING; use typst::math::MATH; +use typst::model::Document; use typst::model::MODEL; use typst::symbols::SYMBOLS; use typst::text::{Font, FontBook, TEXT}; @@ -97,7 +98,7 @@ pub trait Resolver { fn image(&self, filename: &str, data: &[u8]) -> String; /// Produce HTML for an example. - fn example(&self, hash: u128, source: Option<Html>, frames: &[Frame]) -> Html; + fn example(&self, hash: u128, source: Option<Html>, document: &Document) -> Html; /// Determine the commits between two tags. fn commits(&self, from: &str, to: &str) -> Vec<Commit>; @@ -789,7 +790,7 @@ mod tests { None } - fn example(&self, _: u128, _: Option<Html>, _: &[Frame]) -> Html { + fn example(&self, _: u128, _: Option<Html>, _: &Document) -> Html { Html::new(String::new()) } |
