Yeah, this, this is magic

This commit is contained in:
Hayden Hargreaves 2025-11-17 22:36:28 -07:00
parent ed6e217ae8
commit 0d693fc728

View File

@ -133,7 +133,7 @@ impl Node {
} }
pub fn main() { pub fn main() {
let root = Node::Document { let mut root = Node::Document {
children: vec![Node::Heading { children: vec![Node::Heading {
level: 1, level: 1,
children: vec![ children: vec![
@ -150,5 +150,13 @@ pub fn main() {
}], }],
}; };
let p = Node::Paragraph {
children: vec![Node::Text {
content: String::from("This is a paragraph tag."),
}],
};
root.add_child(p);
println!("{}", root.to_html()) println!("{}", root.to_html())
} }