diff --git a/src/parser/bullshitium.rs b/src/parser/bullshitium.rs index f31a158..52e97d0 100644 --- a/src/parser/bullshitium.rs +++ b/src/parser/bullshitium.rs @@ -81,7 +81,7 @@ pub(crate) fn broken_end<'b, 'g, 'r, 's>( Ok(( remaining, - Paragraph::of_text_full( + Paragraph::of_text( input.get_until(remaining).into(), body, if body.len() > 0 { Some(body) } else { None }, @@ -142,7 +142,7 @@ pub(crate) fn broken_dynamic_block<'b, 'g, 'r, 's>( Ok(( remaining, - Paragraph::of_text_full( + Paragraph::of_text( input.get_until(remaining).into(), body, if body.len() > 0 { Some(body) } else { None }, diff --git a/src/parser/paragraph.rs b/src/parser/paragraph.rs index 237dce1..0223fef 100644 --- a/src/parser/paragraph.rs +++ b/src/parser/paragraph.rs @@ -101,7 +101,7 @@ pub(crate) fn empty_paragraph<'b, 'g, 'r, 's>( let source = get_consumed(input, remaining); Ok(( remaining, - Paragraph::of_text_full( + Paragraph::of_text( Into::<&str>::into(source), Into::<&str>::into(first_line_with_spaces), Some(Into::<&str>::into(first_line_with_spaces)), @@ -116,7 +116,7 @@ pub(crate) fn empty_paragraph<'b, 'g, 'r, 's>( let source = get_consumed(input, remaining); Ok(( remaining, - Paragraph::of_text_full( + Paragraph::of_text( Into::<&str>::into(source), Into::<&str>::into(first_line), Some(Into::<&str>::into(first_line)), diff --git a/src/types/lesser_element.rs b/src/types/lesser_element.rs index 32b0c81..660eb43 100644 --- a/src/types/lesser_element.rs +++ b/src/types/lesser_element.rs @@ -204,21 +204,7 @@ impl<'s> Paragraph<'s> { /// Generate a paragraph of the passed in text with no additional properties. /// /// This is used for elements that support an "empty" content like greater blocks. - pub(crate) fn of_text(source: &'s str, body: &'s str) -> Self { - // TODO: This should be replaced with of_text_full. - Paragraph { - source, - contents: None, - post_blank: None, - affiliated_keywords: AffiliatedKeywords::default(), - children: vec![Object::PlainText(PlainText { source: body })], - } - } - - /// Generate a paragraph of the passed in text with no additional properties. - /// - /// This is used for elements that support an "empty" content like greater blocks. - pub(crate) fn of_text_full( + pub(crate) fn of_text( source: &'s str, body: &'s str, contents: Option<&'s str>,