Fix handling of documents containing only whitespace.
This commit is contained in:
@@ -17,7 +17,7 @@ pub struct Document<'s> {
|
||||
pub path: Option<PathBuf>,
|
||||
pub zeroth_section: Option<Section<'s>>,
|
||||
pub children: Vec<Heading<'s>>,
|
||||
pub contents: Option<&'s str>,
|
||||
pub contents: &'s str,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -64,7 +64,7 @@ impl<'s> StandardProperties<'s> for Document<'s> {
|
||||
}
|
||||
|
||||
fn get_contents<'b>(&'b self) -> Option<&'s str> {
|
||||
self.contents
|
||||
Some(self.contents)
|
||||
}
|
||||
|
||||
fn get_post_blank(&self) -> PostBlank {
|
||||
|
||||
Reference in New Issue
Block a user