From fb922193b18aef1097d2882bf037b479d0474534 Mon Sep 17 00:00:00 2001 From: sam lovelace Date: Sun, 28 Nov 2021 03:25:55 +0000 Subject: [PATCH 1/2] added text fields to blockquote and empasis --- src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index fc49240..6f22d37 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,12 +18,16 @@ pub struct CodeBlock { pub struct Emphasis { italic: bool, bold: bool, + text: String, } pub struct Blockquote { level: u8, + text: String, } // TODO: able take care of lists i am too drunk for this tonight + + pub fn parse() {} From 11681dcd5c270c205d2f2079de8c97e9b01fb654 Mon Sep 17 00:00:00 2001 From: Alex Bethel Date: Sat, 27 Nov 2021 20:30:50 -0700 Subject: [PATCH 2/2] Document AST structure --- src/lib.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 6f22d37..b74c5bd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -15,9 +15,11 @@ pub struct CodeBlock { text: String, } -pub struct Emphasis { +pub struct StyledText { italic: bool, bold: bool, + underline: bool, + color: Option, text: String, } @@ -26,6 +28,14 @@ pub struct Blockquote { text: String, } +pub enum Node { + Header(Header), + Paragraph(Vec), + HRule, +} + +pub struct Document(Vec); + // TODO: able take care of lists i am too drunk for this tonight