summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-12-02 13:37:33 +0100
committerLaurenz <laurmaedje@gmail.com>2024-12-04 10:12:07 +0100
commitf8f2ba6a5f8c8ca7dbb85cf17b73332a0c301c60 (patch)
treeb3bc754509fb3ab4c74493848fe96f116b7907ed /docs
parent76c24ee6e35715cd14bb892d7b6b8d775c680bf7 (diff)
Rename `Document` to `PagedDocument`
Diffstat (limited to 'docs')
-rw-r--r--docs/src/lib.rs9
-rw-r--r--docs/src/main.rs4
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!(