feat: derive Debug for StackEntry

This commit is contained in:
Tobias Schmitz 2025-07-14 13:18:43 +02:00
parent e43b8bbb7f
commit 4b57373653
No known key found for this signature in database
4 changed files with 11 additions and 4 deletions

View File

@ -2,11 +2,13 @@ use krilla::tagging::{ListNumbering, TagKind};
use crate::tags::TagNode;
#[derive(Debug)]
pub(crate) struct ListCtx {
numbering: ListNumbering,
items: Vec<ListItem>,
}
#[derive(Debug)]
struct ListItem {
label: Vec<TagNode>,
body: Option<Vec<TagNode>>,

View File

@ -395,18 +395,20 @@ impl Tags {
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub(crate) struct TableId(u32);
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub(crate) struct LinkId(u32);
#[derive(Debug)]
pub(crate) struct StackEntry {
pub(crate) loc: Location,
pub(crate) kind: StackEntryKind,
pub(crate) nodes: Vec<TagNode>,
}
#[derive(Debug)]
pub(crate) enum StackEntryKind {
Standard(Tag),
Outline(OutlineCtx),

View File

@ -4,6 +4,7 @@ use typst_library::model::OutlineEntry;
use crate::tags::TagNode;
#[derive(Debug)]
pub(crate) struct OutlineCtx {
stack: Vec<OutlineSection>,
}
@ -52,6 +53,7 @@ impl OutlineCtx {
}
}
#[derive(Debug)]
pub(crate) struct OutlineSection {
entries: Vec<TagNode>,
}

View File

@ -12,6 +12,7 @@ use typst_library::pdf::{TableCellKind, TableHeaderScope};
use crate::tags::{TableId, TagNode};
#[derive(Debug)]
pub(crate) struct TableCtx {
pub(crate) id: TableId,
pub(crate) summary: Option<String>,
@ -252,7 +253,7 @@ impl TableCtx {
}
}
#[derive(Clone, Default)]
#[derive(Clone, Debug, Default)]
enum GridCell {
Cell(TableCtxCell),
Spanned(usize, usize),
@ -286,7 +287,7 @@ impl GridCell {
}
}
#[derive(Clone)]
#[derive(Clone, Debug)]
struct TableCtxCell {
x: u32,
y: u32,