From f8f2ba6a5f8c8ca7dbb85cf17b73332a0c301c60 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 2 Dec 2024 13:37:33 +0100 Subject: Rename `Document` to `PagedDocument` --- docs/src/lib.rs | 9 +++++---- docs/src/main.rs | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'docs/src') 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, document: &Document) -> Html; + fn example(&self, hash: u128, source: Option, document: &PagedDocument) + -> Html; /// Determine the commits between two tags. fn commits(&self, from: &str, to: &str) -> Vec; @@ -800,7 +801,7 @@ mod tests { None } - fn example(&self, _: u128, _: Option, _: &Document) -> Html { + fn example(&self, _: u128, _: Option, _: &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, - document: &Document, + document: &PagedDocument, ) -> typst_docs::Html { if self.verbose { eprintln!( -- cgit v1.2.3