diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/src/lib.rs | 9 | ||||
| -rw-r--r-- | docs/src/main.rs | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/docs/src/lib.rs b/docs/src/lib.rs index 9228a990..5ca3724a 100644 --- a/docs/src/lib.rs +++ b/docs/src/lib.rs @@ -21,10 +21,10 @@ use typst::foundations::{ Scope, Smart, Type, Value, FOUNDATIONS, }; use typst::introspection::INTROSPECTION; -use typst::layout::{Abs, Margin, PageElem, LAYOUT}; +use typst::layout::{Abs, Margin, PageElem, PagedDocument, LAYOUT}; use typst::loading::DATA_LOADING; use typst::math::MATH; -use typst::model::{Document, MODEL}; +use typst::model::MODEL; use typst::symbols::SYMBOLS; use typst::text::{Font, FontBook, TEXT}; use typst::utils::LazyHash; @@ -105,7 +105,8 @@ pub trait Resolver { fn image(&self, filename: &str, data: &[u8]) -> String; /// Produce HTML for an example. - fn example(&self, hash: u128, source: Option<Html>, document: &Document) -> Html; + fn example(&self, hash: u128, source: Option<Html>, document: &PagedDocument) + -> Html; /// Determine the commits between two tags. fn commits(&self, from: &str, to: &str) -> Vec<Commit>; @@ -800,7 +801,7 @@ mod tests { None } - fn example(&self, _: u128, _: Option<Html>, _: &Document) -> Html { + fn example(&self, _: u128, _: Option<Html>, _: &PagedDocument) -> Html { Html::new(String::new()) } diff --git a/docs/src/main.rs b/docs/src/main.rs index d87e359b..f8d7c934 100644 --- a/docs/src/main.rs +++ b/docs/src/main.rs @@ -2,7 +2,7 @@ use std::fs; use std::path::{Path, PathBuf}; use clap::Parser; -use typst::model::Document; +use typst::layout::PagedDocument; use typst_docs::{provide, Html, Resolver}; use typst_render::render; @@ -25,7 +25,7 @@ impl<'a> Resolver for CliResolver<'a> { &self, hash: u128, source: Option<Html>, - document: &Document, + document: &PagedDocument, ) -> typst_docs::Html { if self.verbose { eprintln!( |
