Compare todo-type on headlines.
This commit is contained in:
@@ -13,7 +13,7 @@ pub struct Document<'s> {
|
||||
pub struct Heading<'s> {
|
||||
pub source: &'s str,
|
||||
pub stars: usize,
|
||||
pub todo_keyword: Option<&'s str>,
|
||||
pub todo_keyword: Option<(TodoKeywordType, &'s str)>,
|
||||
// TODO: add todo-type enum
|
||||
pub title: Vec<Object<'s>>,
|
||||
pub tags: Vec<&'s str>,
|
||||
@@ -32,6 +32,12 @@ pub enum DocumentElement<'s> {
|
||||
Section(Section<'s>),
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum TodoKeywordType {
|
||||
Todo,
|
||||
Done,
|
||||
}
|
||||
|
||||
impl<'s> Source<'s> for Document<'s> {
|
||||
fn get_source(&'s self) -> &'s str {
|
||||
self.source
|
||||
|
||||
@@ -8,6 +8,7 @@ pub use document::Document;
|
||||
pub use document::DocumentElement;
|
||||
pub use document::Heading;
|
||||
pub use document::Section;
|
||||
pub use document::TodoKeywordType;
|
||||
pub use element::Element;
|
||||
pub use greater_element::Drawer;
|
||||
pub use greater_element::DynamicBlock;
|
||||
|
||||
Reference in New Issue
Block a user