Fix alt header test

This commit is contained in:
Alex Bethel 2021-11-27 21:39:41 -07:00
parent df27e0af25
commit bff5ee3fcd

View file

@ -265,9 +265,12 @@ Paragraph 4",
let doc = parse( let doc = parse(
"\ "\
Text Text
Header Header 1
------ ========
More text", More text
Header 2
--------
",
); );
let doc_ref = Document(vec![ let doc_ref = Document(vec![
Node::Paragraph(vec![StyledText { Node::Paragraph(vec![StyledText {
@ -278,7 +281,7 @@ More text",
text: "Text".to_string(), text: "Text".to_string(),
}]), }]),
Node::Header(Header { Node::Header(Header {
label: "Header".to_string(), label: "Header 1".to_string(),
level: 1, level: 1,
}), }),
Node::Paragraph(vec![StyledText { Node::Paragraph(vec![StyledText {
@ -288,6 +291,10 @@ More text",
color: None, color: None,
text: "More text".to_string(), text: "More text".to_string(),
}]), }]),
Node::Header(Header {
label: "Header 2".to_string(),
level: 2,
}),
]); ]);
assert_eq!(doc, doc_ref); assert_eq!(doc, doc_ref);