Use context_many1 for paragraphs in a document.
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
use super::text::Paragraph;
|
||||
use super::text::TextElement;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum Token<'a> {
|
||||
TextElement(TextElement<'a>),
|
||||
Paragraph(Paragraph<'a>),
|
||||
}
|
||||
|
||||
impl<'a> Into<Token<'a>> for TextElement<'a> {
|
||||
@@ -10,3 +12,9 @@ impl<'a> Into<Token<'a>> for TextElement<'a> {
|
||||
Token::TextElement(self)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<Token<'a>> for Paragraph<'a> {
|
||||
fn into(self) -> Token<'a> {
|
||||
Token::Paragraph(self)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user