Handle greater blocks with only blank space inside them.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use super::object::Object;
|
||||
use super::object::{Object, TextMarkup};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Paragraph<'s> {
|
||||
@@ -10,3 +10,14 @@ pub struct Paragraph<'s> {
|
||||
pub struct Comment<'s> {
|
||||
pub source: &'s str,
|
||||
}
|
||||
|
||||
impl<'s> Paragraph<'s> {
|
||||
pub fn of_text(input: &'s str) -> Self {
|
||||
let mut objects = Vec::with_capacity(1);
|
||||
objects.push(Object::TextMarkup(TextMarkup { source: input }));
|
||||
Paragraph {
|
||||
source: input,
|
||||
children: objects,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user