From 6ac71eeaf7b68dab07f75bd1a480810481fa9b73 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 17 Jan 2024 21:50:35 +0100 Subject: Add `Page` struct To get rid of the Meta hack where numbering and things like that are stored in the frame. --- crates/typst-docs/src/lib.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'crates/typst-docs/src/lib.rs') 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, frames: &[Frame]) -> Html; + fn example(&self, hash: u128, source: Option, document: &Document) -> Html; /// Determine the commits between two tags. fn commits(&self, from: &str, to: &str) -> Vec; @@ -789,7 +790,7 @@ mod tests { None } - fn example(&self, _: u128, _: Option, _: &[Frame]) -> Html { + fn example(&self, _: u128, _: Option, _: &Document) -> Html { Html::new(String::new()) } -- cgit v1.2.3