Parse priority cookie and COMMENT from headlines.
This commit is contained in:
@@ -2,6 +2,8 @@ use super::Element;
|
||||
use super::Object;
|
||||
use super::Source;
|
||||
|
||||
pub type PriorityCookie = u8;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Document<'s> {
|
||||
pub source: &'s str,
|
||||
@@ -14,10 +16,12 @@ pub struct Heading<'s> {
|
||||
pub source: &'s str,
|
||||
pub stars: usize,
|
||||
pub todo_keyword: Option<(TodoKeywordType, &'s str)>,
|
||||
// TODO: add todo-type enum
|
||||
pub priority_cookie: Option<PriorityCookie>,
|
||||
pub title: Vec<Object<'s>>,
|
||||
pub tags: Vec<&'s str>,
|
||||
pub children: Vec<DocumentElement<'s>>,
|
||||
pub is_comment: bool,
|
||||
pub is_archived: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
||||
@@ -7,6 +7,7 @@ mod source;
|
||||
pub use document::Document;
|
||||
pub use document::DocumentElement;
|
||||
pub use document::Heading;
|
||||
pub use document::PriorityCookie;
|
||||
pub use document::Section;
|
||||
pub use document::TodoKeywordType;
|
||||
pub use element::Element;
|
||||
|
||||
Reference in New Issue
Block a user