mirror of
https://github.com/typst/typst
synced 2025-07-27 14:27:56 +08:00
feat: derive Debug for StackEntry
This commit is contained in:
parent
e43b8bbb7f
commit
4b57373653
@ -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>>,
|
||||
|
@ -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),
|
||||
|
@ -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>,
|
||||
}
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user