block: specify task check in event
instead of using span
This commit is contained in:
parent
6200b07287
commit
116245367a
2 changed files with 80 additions and 66 deletions
12
src/lib.rs
12
src/lib.rs
|
@ -943,12 +943,12 @@ impl<'s> Parser<'s> {
|
|||
Container::List { kind, tight }
|
||||
}
|
||||
}
|
||||
block::Container::ListItem(ty) => match ty {
|
||||
block::ListType::Task => Container::TaskListItem {
|
||||
checked: content.as_bytes()[3] != b' ',
|
||||
},
|
||||
block::ListType::Description => Container::DescriptionDetails,
|
||||
_ => Container::ListItem,
|
||||
block::Container::ListItem(kind) => match kind {
|
||||
block::ListItemKind::Task { checked } => {
|
||||
Container::TaskListItem { checked }
|
||||
}
|
||||
block::ListItemKind::Description => Container::DescriptionDetails,
|
||||
block::ListItemKind::List => Container::ListItem,
|
||||
},
|
||||
block::Container::Table => Container::Table,
|
||||
block::Container::TableRow { head } => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue