Add paragraph.
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
use crate::error::CustomError;
|
||||
|
||||
use super::registry::Registry;
|
||||
use super::IParagraph;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(crate) enum IElement {}
|
||||
pub(crate) enum IElement {
|
||||
Paragraph(IParagraph),
|
||||
}
|
||||
|
||||
impl IElement {
|
||||
pub(crate) fn new<'parse>(
|
||||
@@ -11,7 +14,9 @@ impl IElement {
|
||||
elem: &organic::types::Element<'parse>,
|
||||
) -> Result<IElement, CustomError> {
|
||||
match elem {
|
||||
organic::types::Element::Paragraph(_) => todo!(),
|
||||
organic::types::Element::Paragraph(inner) => {
|
||||
Ok(IElement::Paragraph(IParagraph::new(registry, inner)?))
|
||||
}
|
||||
organic::types::Element::PlainList(_) => todo!(),
|
||||
organic::types::Element::CenterBlock(_) => todo!(),
|
||||
organic::types::Element::QuoteBlock(_) => todo!(),
|
||||
|
||||
Reference in New Issue
Block a user