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;
|
use crate::tags::TagNode;
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub(crate) struct ListCtx {
|
pub(crate) struct ListCtx {
|
||||||
numbering: ListNumbering,
|
numbering: ListNumbering,
|
||||||
items: Vec<ListItem>,
|
items: Vec<ListItem>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
struct ListItem {
|
struct ListItem {
|
||||||
label: Vec<TagNode>,
|
label: Vec<TagNode>,
|
||||||
body: Option<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);
|
pub(crate) struct TableId(u32);
|
||||||
|
|
||||||
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||||
pub(crate) struct LinkId(u32);
|
pub(crate) struct LinkId(u32);
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub(crate) struct StackEntry {
|
pub(crate) struct StackEntry {
|
||||||
pub(crate) loc: Location,
|
pub(crate) loc: Location,
|
||||||
pub(crate) kind: StackEntryKind,
|
pub(crate) kind: StackEntryKind,
|
||||||
pub(crate) nodes: Vec<TagNode>,
|
pub(crate) nodes: Vec<TagNode>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub(crate) enum StackEntryKind {
|
pub(crate) enum StackEntryKind {
|
||||||
Standard(Tag),
|
Standard(Tag),
|
||||||
Outline(OutlineCtx),
|
Outline(OutlineCtx),
|
||||||
|
@ -4,6 +4,7 @@ use typst_library::model::OutlineEntry;
|
|||||||
|
|
||||||
use crate::tags::TagNode;
|
use crate::tags::TagNode;
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub(crate) struct OutlineCtx {
|
pub(crate) struct OutlineCtx {
|
||||||
stack: Vec<OutlineSection>,
|
stack: Vec<OutlineSection>,
|
||||||
}
|
}
|
||||||
@ -52,6 +53,7 @@ impl OutlineCtx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub(crate) struct OutlineSection {
|
pub(crate) struct OutlineSection {
|
||||||
entries: Vec<TagNode>,
|
entries: Vec<TagNode>,
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ use typst_library::pdf::{TableCellKind, TableHeaderScope};
|
|||||||
|
|
||||||
use crate::tags::{TableId, TagNode};
|
use crate::tags::{TableId, TagNode};
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub(crate) struct TableCtx {
|
pub(crate) struct TableCtx {
|
||||||
pub(crate) id: TableId,
|
pub(crate) id: TableId,
|
||||||
pub(crate) summary: Option<String>,
|
pub(crate) summary: Option<String>,
|
||||||
@ -252,7 +253,7 @@ impl TableCtx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Default)]
|
#[derive(Clone, Debug, Default)]
|
||||||
enum GridCell {
|
enum GridCell {
|
||||||
Cell(TableCtxCell),
|
Cell(TableCtxCell),
|
||||||
Spanned(usize, usize),
|
Spanned(usize, usize),
|
||||||
@ -286,7 +287,7 @@ impl GridCell {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone, Debug)]
|
||||||
struct TableCtxCell {
|
struct TableCtxCell {
|
||||||
x: u32,
|
x: u32,
|
||||||
y: u32,
|
y: u32,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user