Add check for name on paragraph.

This commit is contained in:
Tom Alexander
2023-10-04 19:56:39 -04:00
parent 057c8a1387
commit a26640355c
5 changed files with 26 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ use super::Timestamp;
#[derive(Debug)]
pub struct Paragraph<'s> {
pub source: &'s str,
pub name: Option<&'s str>,
pub children: Vec<Object<'s>>,
}
@@ -146,6 +147,7 @@ impl<'s> Paragraph<'s> {
objects.push(Object::PlainText(PlainText { source: input }));
Paragraph {
source: input,
name: None, // TODO
children: objects,
}
}