Implement verse token, scaffold quote token
This commit is contained in:
parent
3ea6c53920
commit
aa41e33ced
9 changed files with 325 additions and 45 deletions
|
|
@ -1,6 +1,6 @@
|
|||
use crate::syntax::content::parser::{
|
||||
State, Token,
|
||||
token::{Header, Paragraph, PreFormat},
|
||||
token::{Header, Paragraph, PreFormat, Quote, Verse},
|
||||
};
|
||||
|
||||
pub mod block;
|
||||
|
|
@ -20,6 +20,8 @@ pub enum Block {
|
|||
Header(u8), // level
|
||||
List,
|
||||
PreFormat,
|
||||
Quote,
|
||||
Verse,
|
||||
None,
|
||||
}
|
||||
|
||||
|
|
@ -46,6 +48,12 @@ pub fn close(state: &State, tokens: &mut Vec<Token>) {
|
|||
Block::Header(level) => {
|
||||
tokens.push(Token::Header(Header::from_u8(level, false, None)));
|
||||
},
|
||||
Block::Quote => {
|
||||
tokens.push(Token::Quote(Quote::new(false)));
|
||||
},
|
||||
Block::Verse => {
|
||||
tokens.push(Token::Verse(Verse::new(false)));
|
||||
},
|
||||
Block::None => (),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue