Yeah, this, this is magic
This commit is contained in:
parent
ed6e217ae8
commit
0d693fc728
10
src/main.rs
10
src/main.rs
@ -133,7 +133,7 @@ impl Node {
|
||||
}
|
||||
|
||||
pub fn main() {
|
||||
let root = Node::Document {
|
||||
let mut root = Node::Document {
|
||||
children: vec![Node::Heading {
|
||||
level: 1,
|
||||
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())
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user