Starting the greater block source.
This commit is contained in:
parent
9ad428bb20
commit
9e0bea4c3e
@ -1,4 +1,5 @@
|
|||||||
use super::error::Res;
|
use super::error::Res;
|
||||||
|
use super::greater_element::GreaterBlock;
|
||||||
use super::greater_element::PlainList;
|
use super::greater_element::PlainList;
|
||||||
use super::lesser_element::Paragraph;
|
use super::lesser_element::Paragraph;
|
||||||
use super::paragraph::paragraph;
|
use super::paragraph::paragraph;
|
||||||
@ -13,6 +14,7 @@ use nom::combinator::map;
|
|||||||
pub enum Element<'s> {
|
pub enum Element<'s> {
|
||||||
Paragraph(Paragraph<'s>),
|
Paragraph(Paragraph<'s>),
|
||||||
PlainList(PlainList<'s>),
|
PlainList(PlainList<'s>),
|
||||||
|
GreaterBlock(GreaterBlock<'s>),
|
||||||
/// The whitespace that follows an element.
|
/// The whitespace that follows an element.
|
||||||
///
|
///
|
||||||
/// This isn't a real org-mode element. Except for items in plain lists, trailing blank lines belong to the preceding element. It is a separate `Element` in this enum to make parsing easier.
|
/// This isn't a real org-mode element. Except for items in plain lists, trailing blank lines belong to the preceding element. It is a separate `Element` in this enum to make parsing easier.
|
||||||
@ -24,6 +26,7 @@ impl<'s> Source<'s> for Element<'s> {
|
|||||||
match self {
|
match self {
|
||||||
Element::Paragraph(obj) => obj.source,
|
Element::Paragraph(obj) => obj.source,
|
||||||
Element::PlainList(obj) => obj.source,
|
Element::PlainList(obj) => obj.source,
|
||||||
|
Element::GreaterBlock(obj) => obj.source,
|
||||||
Element::TrailingWhitespace(src) => src,
|
Element::TrailingWhitespace(src) => src,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
1
src/parser/greater_block.rs
Normal file
1
src/parser/greater_block.rs
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
@ -1,6 +1,7 @@
|
|||||||
mod document;
|
mod document;
|
||||||
mod element;
|
mod element;
|
||||||
mod error;
|
mod error;
|
||||||
|
mod greater_block;
|
||||||
mod greater_element;
|
mod greater_element;
|
||||||
mod lesser_element;
|
mod lesser_element;
|
||||||
mod list;
|
mod list;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user