parser: test nested list
This commit is contained in:
parent
70d29c65e4
commit
845c56fd0b
1 changed files with 44 additions and 0 deletions
44
src/lib.rs
44
src/lib.rs
|
@ -1052,6 +1052,50 @@ mod test {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn list_item_unordered_nest() {
|
||||
test_parse!(
|
||||
concat!(
|
||||
"- a\n", //
|
||||
"\n", //
|
||||
" - aa\n", //
|
||||
),
|
||||
Start(
|
||||
List {
|
||||
kind: ListKind::Unordered,
|
||||
tight: false,
|
||||
},
|
||||
Attributes::new(),
|
||||
),
|
||||
Start(ListItem, Attributes::new()),
|
||||
Start(Paragraph, Attributes::new()),
|
||||
Str("a".into()),
|
||||
End(Paragraph),
|
||||
Atom(Blankline),
|
||||
Start(
|
||||
List {
|
||||
kind: ListKind::Unordered,
|
||||
tight: true,
|
||||
},
|
||||
Attributes::new(),
|
||||
),
|
||||
Start(ListItem, Attributes::new()),
|
||||
Start(Paragraph, Attributes::new()),
|
||||
Str("aa".into()),
|
||||
End(Paragraph),
|
||||
End(ListItem),
|
||||
End(List {
|
||||
kind: ListKind::Unordered,
|
||||
tight: true,
|
||||
}),
|
||||
End(ListItem),
|
||||
End(List {
|
||||
kind: ListKind::Unordered,
|
||||
tight: true,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn list_item_ordered_decimal() {
|
||||
test_parse!(
|
||||
|
|
Loading…
Reference in a new issue