Remove the SetSource trait.
It was only being used for creating paragraphs of specific text, so I just adjusted the of_text function to handle it.
This commit is contained in:
@@ -31,7 +31,6 @@ use crate::types::Drawer;
|
||||
use crate::types::Element;
|
||||
use crate::types::Keyword;
|
||||
use crate::types::Paragraph;
|
||||
use crate::types::SetSource;
|
||||
|
||||
#[cfg_attr(
|
||||
feature = "tracing",
|
||||
@@ -81,9 +80,8 @@ where
|
||||
))(remaining)
|
||||
{
|
||||
Ok((remain, (_not_immediate_exit, first_line, (_trailing_whitespace, _exit_contents)))) => {
|
||||
let mut element = Element::Paragraph(Paragraph::of_text(first_line.into()));
|
||||
let source = get_consumed(remaining, remain);
|
||||
element.set_source(source.into());
|
||||
let element = Element::Paragraph(Paragraph::of_text(source.into(), first_line.into()));
|
||||
(remain, vec![element])
|
||||
}
|
||||
Err(_) => {
|
||||
|
||||
Reference in New Issue
Block a user