Document AST structure
This commit is contained in:
parent
fb922193b1
commit
11681dcd5c
12
src/lib.rs
12
src/lib.rs
|
@ -15,9 +15,11 @@ pub struct CodeBlock {
|
||||||
text: String,
|
text: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Emphasis {
|
pub struct StyledText {
|
||||||
italic: bool,
|
italic: bool,
|
||||||
bold: bool,
|
bold: bool,
|
||||||
|
underline: bool,
|
||||||
|
color: Option<RGBA>,
|
||||||
text: String,
|
text: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,6 +28,14 @@ pub struct Blockquote {
|
||||||
text: String,
|
text: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub enum Node {
|
||||||
|
Header(Header),
|
||||||
|
Paragraph(Vec<StyledText>),
|
||||||
|
HRule,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct Document(Vec<Node>);
|
||||||
|
|
||||||
// TODO: able take care of lists i am too drunk for this tonight
|
// TODO: able take care of lists i am too drunk for this tonight
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue