From 2d35cbfceace81a217cd0fbdae7a8777c7a6465e Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Thu, 11 Aug 2022 13:31:20 +0200 Subject: Refactor internal docs, code style of tokenizer --- src/construct/code_text.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/construct/code_text.rs') diff --git a/src/construct/code_text.rs b/src/construct/code_text.rs index 2c8faf3..d7ada3d 100644 --- a/src/construct/code_text.rs +++ b/src/construct/code_text.rs @@ -185,16 +185,16 @@ pub fn data(tokenizer: &mut Tokenizer) -> State { pub fn sequence_close(tokenizer: &mut Tokenizer) -> State { match tokenizer.current { Some(b'`') => { - tokenizer.tokenize_state.size_other += 1; + tokenizer.tokenize_state.size_b += 1; tokenizer.consume(); State::Next(StateName::CodeTextSequenceClose) } _ => { - if tokenizer.tokenize_state.size == tokenizer.tokenize_state.size_other { + if tokenizer.tokenize_state.size == tokenizer.tokenize_state.size_b { tokenizer.exit(Token::CodeTextSequence); tokenizer.exit(Token::CodeText); tokenizer.tokenize_state.size = 0; - tokenizer.tokenize_state.size_other = 0; + tokenizer.tokenize_state.size_b = 0; State::Ok } else { let index = tokenizer.events.len(); @@ -202,7 +202,7 @@ pub fn sequence_close(tokenizer: &mut Tokenizer) -> State { // More or less accents: mark as data. tokenizer.events[index - 1].token_type = Token::CodeTextData; tokenizer.events[index].token_type = Token::CodeTextData; - tokenizer.tokenize_state.size_other = 0; + tokenizer.tokenize_state.size_b = 0; State::Retry(StateName::CodeTextBetween) } } -- cgit