Implement nested formatting
This commit is contained in:
parent
c53afefb67
commit
3837af387a
7 changed files with 78 additions and 57 deletions
|
|
@ -6,11 +6,11 @@ use crate::{
|
|||
Parseable as _,
|
||||
parser::{
|
||||
lexeme::Lexeme,
|
||||
token::{
|
||||
Token, oblique::Oblique, bold::Bold, underline::Underline,
|
||||
strike::Strike,
|
||||
},
|
||||
state::State,
|
||||
token::{
|
||||
Token, bold::Bold, checkbox::CheckBox, oblique::Oblique,
|
||||
strike::Strike, underline::Underline,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
@ -50,6 +50,12 @@ pub fn parse(
|
|||
tokens.push(Token::Bold(Bold::new(!state.switches.bold)));
|
||||
state.switches.bold = !state.switches.bold;
|
||||
return true;
|
||||
} else if CheckBox::probe(lexeme) {
|
||||
log!("CheckBox probed: {lexeme}");
|
||||
tokens.push(Token::CheckBox(CheckBox::lex(lexeme)));
|
||||
iterator.next();
|
||||
iterator.next();
|
||||
return true;
|
||||
}
|
||||
false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue