feat(orgize): export indextree crate

This commit is contained in:
PoiScript 2019-10-07 19:55:03 +08:00
parent fdb31c783c
commit b84c135e26
2 changed files with 16 additions and 1 deletions

View file

@ -228,6 +228,9 @@ mod parsers;
mod error; mod error;
// Re-export of the indextree crate.
pub use indextree;
pub use config::ParseConfig; pub use config::ParseConfig;
pub use elements::Element; pub use elements::Element;
pub use error::OrgizeError; pub use error::OrgizeError;

View file

@ -34,6 +34,18 @@ impl HeadlineNode {
} }
} }
pub fn node(self) -> NodeId {
self.node
}
pub fn title_node(self) -> NodeId {
self.title_node
}
pub fn section_node(self) -> Option<NodeId> {
self.section_node
}
pub fn level(self) -> usize { pub fn level(self) -> usize {
self.level self.level
} }
@ -275,7 +287,7 @@ impl HeadlineNode {
#[derive(Copy, Clone, Debug)] #[derive(Copy, Clone, Debug)]
pub struct DocumentNode { pub struct DocumentNode {
pub(crate) section_node: Option<NodeId>, section_node: Option<NodeId>,
} }
impl DocumentNode { impl DocumentNode {